note 71974 added to function.fseek

From: Date: Wed, 27 Dec 2006 09:52:00 +0000
Subject: note 71974 added to function.fseek
Groups: php.notes 
Request: Send a blank email to php-notes+get-120943@lists.php.net to get a copy of this message
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; } ---- Server IP: 66.163.161.117 Probable Submitter: 74.114.163.2 ---- Manual Page -- http://www.php.net/manual/en/function.fseek.php Edit -- https://master.php.net/note/edit/71974 Del: integrated -- https://master.php.net/note/delete/71974/integrated Del: useless -- https://master.php.net/note/delete/71974/useless Del: bad code -- https://master.php.net/note/delete/71974/bad+code Del: spam -- https://master.php.net/note/delete/71974/spam Del: non-english -- https://master.php.net/note/delete/71974/non-english Del: in docs -- https://master.php.net/note/delete/71974/in+docs Del: other reasons-- https://master.php.net/note/delete/71974 Reject -- https://master.php.net/note/reject/71974 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120943) next »