note 69176 added to function.file-put-contents

From: Date: Fri, 25 Aug 2006 14:15:03 +0000
Subject: note 69176 added to function.file-put-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-116322@lists.php.net to get a copy of this message
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 ---- Server IP: 212.47.220.13 Probable Submitter: 195.222.9.197 (proxied: 192.168.2.3) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.file-put-contents.php Edit -- https://master.php.net/note/edit/69176 Del: integrated -- https://master.php.net/note/delete/69176/integrated Del: useless -- https://master.php.net/note/delete/69176/useless Del: bad code -- https://master.php.net/note/delete/69176/bad+code Del: spam -- https://master.php.net/note/delete/69176/spam Del: non-english -- https://master.php.net/note/delete/69176/non-english Del: in docs -- https://master.php.net/note/delete/69176/in+docs Del: other reasons-- https://master.php.net/note/delete/69176 Reject -- https://master.php.net/note/reject/69176 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116322) next »