note 71974 deleted from function.fseek by colder
| From: | colder@php.net | Date: | Wed, 27 Dec 2006 12:24:16 +0000 |
| Subject: | note 71974 deleted from function.fseek by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-120946@lists.php.net to get a copy of this message | ||
Note Submitter: Jim?
Reason: in docs
----
hey my php people!
here is a function that will read one byte of a file
then point at the next
function getbyte(){
global $file;
static $bytepos=0;
fseek($file,$bytepos,SEEK_SET);
$bytepos++;
return fread($file,1);
}
now the next function should work and do the same thing maybe faster
but i can't get it working it maybe a bug i don't know
function getbyte(){
global $file;
$tmp=fread($file,1);
fseek($file,1,SEEK_CUR);
return $tmp;
}