You are here: PHP instances writing to the same file? « PHP Programming Language « IT news, forums, messages
PHP instances writing to the same file?

Posted by abrtlt on 05/04/06 19:59

I read in Programming PHP (O'Reilly) that flock() "cannot prevent two
PHP scripts running in the same web server process from accessing a
file at the same time".
In my case a single PHP script appends text strings to an existing text
file. Several clients may trigger the same script on the same web page
and thus more than one PHP instance might try to open and append text
to the same file at the same time. I would assume that using flock()
_does_ in fact prevent simultaneous access in this case. Am I correct?
Thanks!

Andrew

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация