- Reversing changes from revisions 288122 and 282711, which addressed bug #49329 and bug #48522 (bogus bugs).

- Closes bug #52767.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303153 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gustavo André dos Santos Lopes 2010-09-08 00:17:00 +00:00
parent 49299aaa95
commit 12baf14d9f

View file

@ -63,8 +63,8 @@
<listitem>
<para>
The value of <parameter>flags</parameter> can be any combination of
the following flags (with some restrictions), joined with the binary OR
(<literal>|</literal>) operator.
the following flags, joined with the binary OR (<literal>|</literal>)
operator.
</para>
<para>
<table>
@ -93,9 +93,7 @@
</entry>
<entry>
If file <parameter>filename</parameter> already exists, append
the data to the file instead of overwriting it. Mutually
exclusive with LOCK_EX since appends are atomic and thus there
is no reason to lock.
the data to the file instead of overwriting it.
</entry>
</row>
<row>
@ -104,7 +102,7 @@
</entry>
<entry>
Acquire an exclusive lock on the file while proceeding to the
writing. Mutually exclusive with FILE_APPEND.
writing.
</entry>
</row>
<!-- FIXME PHP_6
@ -188,8 +186,10 @@ file_put_contents($file, $current);
$file = 'people.txt';
// The new person to add to the file
$person = "John Smith\n";
// Append the contents of $person to the file named by $file.
file_put_contents($file, $person, FILE_APPEND);
// Write the contents to the file,
// using the FILE_APPEND flag to append the content to the end of the file
// and the LOCK_EX flag to prevent anyone else writing to the file at the same time
file_put_contents($file, $person, FILE_APPEND | LOCK_EX);
?>
]]>
</programlisting>