note 71891 added to function.file-put-contents
| From: | Curtis at osu1 dot php dot net | Date: | Thu, 21 Dec 2006 11:20:32 +0000 |
| Subject: | note 71891 added to function.file-put-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120822@lists.php.net to get a copy of this message | ||
As to the previous user note, it would be wise to include that code within a conditional statement,
as to prevent re-defining file_put_contents and the FILE_APPEND constant in PHP 5:
<?php
if ( !function_exists('file_put_contents') && !defined('FILE_APPEND')
) {
...
}
?>
Also, if the file could not be accessed for writing, the function should return boolean false, not
0. An error is different from 0 bytes written, in this case.
----
Server IP: 216.194.113.175
Probable Submitter: 72.87.246.179
----
Manual Page -- http://www.php.net/manual/en/function.file-put-contents.php
Edit -- https://master.php.net/note/edit/71891
Del: integrated -- https://master.php.net/note/delete/71891/integrated
Del: useless -- https://master.php.net/note/delete/71891/useless
Del: bad code -- https://master.php.net/note/delete/71891/bad+code
Del: spam -- https://master.php.net/note/delete/71891/spam
Del: non-english -- https://master.php.net/note/delete/71891/non-english
Del: in docs -- https://master.php.net/note/delete/71891/in+docs
Del: other reasons-- https://master.php.net/note/delete/71891
Reject -- https://master.php.net/note/reject/71891
Search -- https://master.php.net/manage/user-notes.php