You are here: Re: file_put_contents flags « PHP Language « IT news, forums, messages
Re: file_put_contents flags

Posted by clb on 12/29/06 23:34

McKirahan wrote:

> The documentation for "file_put_contents" contains this:
> file_put_contents ( string filename, mixed data [, int flags [, resource
> context]] )
> and this:
> flags can take FILE_USE_INCLUDE_PATH, FILE_APPEND and/or LOCK_EX
>
> What isn't clear is how FILE_APPEND and LOCK_EX are used together.
>
> This works:
> file_put_contents($name,$data,FILE_APPEND);
> but this doesn't:
> file_put_contents($name,$data,FILE_APPEND LOCK_EX);
> and this doesn't:
> file_put_contents($name,$data,FILE_APPEND, LOCK_EX);
>
> What am I doing wrong? I can find no examples that use both.
>
> Thanks in advance.

Just a thought, try

file_put_contents($name,$data,FILE_APPEND | LOCK_EX);

 

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

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