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

Posted by McKirahan on 12/29/06 05:10

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.

 

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

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