You are here: Re: Blocking with fopen when file is already open for writing « PHP Programming Language « IT news, forums, messages
Re: Blocking with fopen when file is already open for writing

Posted by NC on 03/04/07 23:47

On Mar 3, 5:06 am, "Efi Merdler" <foo...@gmail.com> wrote:
>
> I created a very simple application that reads and writes to a file, I
> was wondering if fopen when opening a file for write access blocks
> this file, i.e. when another user runs this script the script will
> halt until the first user closes its file handle.

Nothing of the sort. You need to expressly lock the file using
flock(),
which, alas, will not help you on Windows due to Windows' thread
model.

Cheers,
NC

 

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

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