Share on Google+Share on Google+

PHP function ftell() with example

Advertisement
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

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.