fseek
(PHP 3, PHP 4 >= 4.0.0)fseek -- locate the pointer description of a file
int fseek (int fp, int offset [, int whence])
is a reference to this file fp sets the file indicator. This new position is from the beginning of the file specified by offset in bytes, or the position specified by whence. The values of whence are as follows:
SEEK_SET - start from the file; SEEK_CUR - start from the current position; SEEK_END - start from the end of the file.
If whence is not specified, the default is SEEK_SET.
If successful, return 0; otherwise, return -1. Note that locating the terminator EOF is not an error.
If you use the website construction server script class PHPPHP User Manual fancyfunction.fopen.html>fopen() in the format of "http://" or "ftp://", the pointer returned by fopen() cannot use this function.
Note: The whence parameter must be used in PHP 4.0 RC1 or above.
See ftell() and rewind().