svn: /phpdoc/en/trunk/reference/filesystem/functions/ file-put-contents.xml
| From: | Torben Wilson | Date: | Mon, 07 Sep 2009 06:36:10 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/filesystem/functions/ file-put-contents.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4861@lists.php.net to get a copy of this message | ||
torben Mon, 07 Sep 2009 06:36:10 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288122
Log:
Removed a redundant use of LOCK_EX with FILE_APPEND in an example.
Addresses bug #49329.
Bug: http://bugs.php.net/49329 (Open) file_put_contents()
Example #2 : FILE_APPEND and LOCK_EX are exclusive
Changed paths:
U phpdoc/en/trunk/reference/filesystem/functions/file-put-contents.xml
Modified: phpdoc/en/trunk/reference/filesystem/functions/file-put-contents.xml
===================================================================
--- phpdoc/en/trunk/reference/filesystem/functions/file-put-contents.xml 2009-09-07 06:09:52 UTC
(rev 288121)
+++ phpdoc/en/trunk/reference/filesystem/functions/file-put-contents.xml 2009-09-07 06:36:10 UTC
(rev 288122)
@@ -186,10 +186,8 @@
$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>