PHP function ftell() with example

In this PHP tutorial section, we will explain you how to learn about the PHP ftell() function and its example

 
 

Share on Google+Share on Google+

PHP function ftell() with example

Ads

In this PHP tutorial section, we will explain you how to learn about the PHP ftell() function and its example

Syntax

int ftell(file_handle)

  • ftell() function gives the current position of the file pointer.
  • using the file handler in bytes.


Example of PHP ftell() Function

Code
<?php

$file
=fopen("roseindia.txt","r");
echo
ftell($file);
fseek($file,40);
echo
"<br>".ftell($file);
?>

Output
0
40

Advertisements

Posted on: October 30, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles