What is Filesystem ftell in PHP
In this article I am going to explain about ftell function in PHP.
PHP ftell() Function
The filesystem ftell function is used to returns the current position of the file pointer and returns false on failure.
Syntax of ftell function
Parameters in ftell function
It has only one parameter:
Parameter |
Description |
file |
It specifies the open file to check. |
Example of filesystem ftell function
<html>
<body>
<?php
$file= fopen("C:\wamp\www\Dinesh\Mcn.txt","r");
echo "print current position::". ftell($file);
fseek($file,"25");
echo "</br>";
echo "Print pointer current position again::". ftell($file);
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here