Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP ftell() Function

PHP ftell() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


Definition and Usage

The ftell() function returns the current position in an open file.

Returns the current position of the file pointer, or FALSE on failure.

Syntax

ftell(file)

Parameters Description
file Required. Specifies the open file to check.

Example

" . ftell($file); fclose($file); ?>

The code above will output:

0

15


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual