Removed a redundant use of LOCK_EX with FILE_APPEND in an example.

Addresses bug #49329.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288122 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Torben Wilson 2009-09-07 06:36:10 +00:00
parent b0b269785c
commit 14e0c3062d

View file

@ -186,10 +186,8 @@ file_put_contents($file, $current);
$file = 'people.txt';
// The new person to add to the file
$person = "John Smith\n";
// 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);
// Append the contents of $person to the file named by $file.
file_put_contents($file, $person, FILE_APPEND);
?>
]]>
</programlisting>