Name

fseek

Synopsis

int fseek(int handle, int offset[, int from])

Moves the file pointer in handle to the byte offset. If from is specified, it determines how to move the file pointer. from must be one of the following values:

SEEK_SET

Sets the file pointer to the byte offset (the default)

SEEK_CUR

Sets the file pointer to the current location plus offset bytes

SEEK_END

Sets the file pointer to EOF minus offset bytes

This function returns 0 if the function was successful and -1 if the operation failed.

Get Programming PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.