From 14e0c3062d3467dd1b163d66565ed7a7efd22a65 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Mon, 7 Sep 2009 06:36:10 +0000 Subject: [PATCH] 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 --- reference/filesystem/functions/file-put-contents.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reference/filesystem/functions/file-put-contents.xml b/reference/filesystem/functions/file-put-contents.xml index 45911e77b2..7211b444b7 100644 --- a/reference/filesystem/functions/file-put-contents.xml +++ b/reference/filesystem/functions/file-put-contents.xml @@ -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); ?> ]]>