This is an old revision of the document!
WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Position the file pointer in an open file
This function will relocate the file pointer within an active file. Three different start position options are available.
$handle: Valid handle of a previously opened resource
$offset: How far to move the pointer (bytes)
$whence: Seek type, starting position option, from where to move the pointer:
None
<? $fp=fopen("/index.cgi","r"); if ($fp) { fseek($fp,10,2); // position to 10 characters before the end of the file $data=fread($fp,10); print($data); fclose($fp); } else { print("File open failed\n"); } ?>