On Wed, 20 Feb 2002 17:51:30 -0800
"Robert Abbate" <[EMAIL PROTECTED]> wrote:

> I seem to be having trouble being able to *write* text to a file within a
> Windows server. Does anyone know what needs to be done to get this to work?
> I've tried making sure that the direcories are set to the maximum
> permissions (read/write/execute) to anyone. Still doesn't work.
> 
> I'm trying this:
> 
>   $fp = fopen("test.txt", "w"); flock($fp, 1);
>   fputs($fp, "testing");
>   fclose($fp);

Try replacing this:
flock($fp, 1);
with this:
flock($fp, LOCK_EX);
or with this, if you use a PHP version prior to PHP 4.0.1:
flock($fp, 2);

Cheers,

Rubén Gutiérrez


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to