Docs for new argument to fseek().

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@23230 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Andrei Zmievski 2000-04-24 14:36:58 +00:00
parent 5388800a35
commit fdaae312e9

View file

@ -1168,11 +1168,26 @@ fclose ($fd);
<funcdef>int <function>fseek</function></funcdef>
<paramdef>int <parameter>fp</parameter></paramdef>
<paramdef>int <parameter>offset</parameter></paramdef>
<paramdef>int <parameter><optional>whence</optional></parameter></paramdef>
</funcsynopsis>
<para>
Sets the file position indicator for the file referenced by fp to
offset bytes into the file stream. Equivalent to calling (in C)
<literal>fseek(fp, offset, SEEK_SET)</literal>.
Sets the file position indicator for the file referenced by
<parameter>fp</parameter>.The new position, measured in bytes
from the beginning of the file, is obtained by adding
<parameter>offset</parameter> to the position specified by
<parameter>whence</parameter>, whose values are defined as
follows:
<simplelist>
<member>SEEK_SET - Set position equal to
<parameter>offset</parameter> bytes.</member> <member>SEEK_CUR -
Set position to current location plus
<parameter>offset</parameter>.</member> <member>SEEK_END - Set
position to end-of-file plus
<parameter>offset</parameter>.</member>
</simplelist>
</para>
<para>If <parameter>whence is not specified, it is assumed to be
SEEK_SET.</parameter>
</para>
<para>
Upon success, returns 0; otherwise, returns -1. Note that seeking
@ -1183,6 +1198,11 @@ fclose ($fd);
<function>fopen</function> if they use the "http://" or "ftp://"
formats.
</para>
<note>
<para>
The <parameter>whence</parameter> argument was added after PHP 4.0 RC1.
</para>
</note>
<para>
See also <function>ftell</function> and
<function>rewind</function>.