You are here: Re: flock - will this work? « PHP SQL « IT news, forums, messages
Re: flock - will this work?

Posted by Steve on 09/06/05 12:31

> If more than one user clicks the submit button at the same time can I use
> flock to ensure that all the data gets written to the file? Is the following
> code correct?

This will work, but you might also wish to add timeout logic so that if
a user is kept waiting for too long the loop breaks. Where you go from
there will depend on your application and the possible reasons for the
deadlock: ask them to resubmit the form, or come back later, or log an
error and give up.

---
Steve

 

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

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