note 57992 added to function.fwrite
| From: | krystian at gatech dot edu | Date: | Thu, 20 Oct 2005 21:52:33 +0000 |
| Subject: | note 57992 added to function.fwrite | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-97328@lists.php.net to get a copy of this message | ||
Given the following hypothetical code:
$fp = fopen("some.dat", "w");
$result = fwrite($fp, null);
if (! $result) {
echo "couldn't write";
}
fclose($fp);
The output will be "couldn't write". It appears as though you cannot write a null
string to a file.
----
Manual Page -- http://www.php.net/manual/en/function.fwrite.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57992
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57992&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57992&report=yes
Search -- http://master.php.net/manage/user-notes.php