note 46975 added to function.fwrite
| From: | ceilingfishathotmailspotcom at osu1 dot php dot net | Date: | Fri, 29 Oct 2004 06:13:00 +0000 |
| Subject: | note 46975 added to function.fwrite | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79299@lists.php.net to get a copy of this message | ||
If the text that is being written is also zero length, then this function returns zero, just as if
it had failed to write. eg
$blank = '';
if(!fwrite($somefilehandle,$blank,strlen($blank))
{
die 'Some write error';
}
else
{
echo "'$hi' written to file";
}
Will always output :
'Some write error'
----
Manual Page -- http://www.php.net/manual/en/function.fwrite.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46975
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46975&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46975&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46975&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46975&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46975&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46975&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46975&report=yes
Search -- http://master.php.net/manage/user-notes.php