I've seen answers both ways in the archive of this list, and I wonder 
what is true.

Suppose I open a file in append mode - like a log file. Two different 
HTTP connections fire up two different PHP processes which both open 
the same file. Then they both do an fwrite( $fp, "some string" ).

Is the result serializable? That is, is one write guaranteed to be 
appended after the the other? Or is there a chance that one will 
overwrite the other and truncate the file - in which case, I'll need 
an flock() even for the simplest log file.

What if I opened the file in some other mode, like "w" or "r+"?

Herouth

(If you answer, please make sure you cc to my e-mail, as I read this 
list in digest mode).




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

Reply via email to