O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

fseek

Synopsis

int fseek(resource 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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required