> argument, so don't I *have* to fopen the file before going to flock()? Or
> should I fopen first in "r" mode, acquire the lock, then re-open in "w"
> mode, counting on the lock to stay in effect even though it's a different
> file pointer?
Yup. You are holding the lock, and it's yours
> I'd also be grateful if someone could clarify the difference between
> blocking and locking (i.e. "If you don't want flock() to block while
> locking, add LOCK_NB (4 prior to PHP 4.0.1) to operation.").
blocking == Do you want your script to just sit there waiting forever for
the lock?
Possibly spurious NOTE:
Most beginners who think they need a lock file are doing something that
should be in a database, but they are not familiar with databases, so use
files instead.
Don't.
The database guys have worked really hard to (A) take care of all these
locking issues and (B) make it just as easy to use as files.
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]