/*
int fseek ( resource $handle , int $offset [, int $whence = SEEK_SET ] )
*/
$fp = fopen('e:/test.txt', 'r');
echo fgets($fp, 5) . "<br />";
// move back to the end of the file
fseek($fp, 0, SEEK_END);
echo fgets($fp, 5) . "<br />";
fclose($fp);
/*
run:
PHP
*/