Home >> PHP >> ftell() function in PHP

ftell() function in PHP

The ftell() function returns the current position of the read/write file.

Returns the position of the file pointer If an error occurs, returns false.

Syntax

ftell(file)

Example

$file = fopen("content.php", "r");

$content = fgets($file, 12);

echo ftell($file);

fclose($file);

Output

11

Post Your Comment

Next Questions
ftruncate() function
is_executable() function
is_file() function
is_link() function
is_readable() function
is_writable() function
link() function
linkinfo() function
pathinfo() function
readfile() function
readlink() function
realpath() function
rename() function
tmpfile() function
umask() function
How to swap two numbers without using a temprory variable
How to swap two numbers
How can find factorial using for loop
How can find reverse number of a number
How can find number is palindrome or not
How can check number prime number or not
Fibonacci series
Fibonacci series using recursive
Print number 1 to 10 without loop
How can i sort array ascending order without function

Copyright ©2022 coderraj.com. All Rights Reserved.