checking if a file is locked before trying to open it for write?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I've been reading my copy of the manual regarding flock() and it
appears that a script will have to try to open the file before finding
out if it is locked.

So, if another script has a lock on the file and the current script
does is_writable on the file, will it return false (and trying to open
the file will generate a permission denied error ?).

This assumes a multi user situation, like two or more admin users
are logged into one cms system and are trying to editing  the same
file at the same time.

Thanks
JK

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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux