note 69176 deleted from function.file-put-contents by bjori
| From: | bjori@php.net | Date: | Sat, 26 Aug 2006 11:30:50 +0000 |
| Subject: | note 69176 deleted from function.file-put-contents by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116350@lists.php.net to get a copy of this message | ||
Note Submitter: glen at delfi dot ee
Reason: integrated
----
note that function return FALSE if the write operation fails, not as documented int bytes_written:
<?
$ php -r '$ret = file_put_contents("/inexitent/path", "jura");
printf("ret:[%s]: type:[%s]\n", $ret, gettype($ret)); echo
phpversion(),"\n";'
?>
PHP Warning: file_put_contents(/inexitent/path): failed to open stream: No such file or directory
in Command line code on line 1
ret:[]: type:[boolean]
5.1.4