Home  >  Article  >  Backend Development  >  PHP4 User Manual: Function-fseek_PHP Tutorial

PHP4 User Manual: Function-fseek_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:22:14877browse

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().

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532345.htmlTechArticlefseek (PHP 3, PHP 4 >= 4.0.0)fseek -- Locate the pointer description of a file int fseek (int fp, int offset [, int whence]) Sets the file pointer for this file reference fp. This new bit...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn