In article <030a01c0fd4a$0f797840$6401a8c0@Lynchux100>,
[EMAIL PROTECTED] ("Richard Lynch") wrote:
> > 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
Kewl. That's just what I needed to know. Thanks, Manuel and Richard!
> 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.
...and (C) faster in most cases--as counter-intuitive as that seems--and
(D) indexed, and (E) etc... No, not a spurious note at all. It's a good
point that can save some poor soul (though unfortunately not me on this
ocassion! <g>) a lot of grief.
--
CC
--
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]