note 82132 deleted from function.fseek by betz
| From: | betz@php.net | Date: | Sat, 29 Mar 2008 22:55:12 +0000 |
| Subject: | note 82132 deleted from function.fseek by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137735@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
Reason: in docs
----
Notice the interesting return value of fseek() which is 0/-1.
So don't do:
<?php
if(!fseek(...))
{ echo 'Oh, my god. fseek() failed!'; }
else
{ echo 'Success.'; }
?>
Do:
<?php
if(fseek(...)!='0')
{ echo 'Oh, my god. fseek() failed!'; }
?>
Took me some time to notice that this function's return value is always false for some reason.