Home Tutorial Php Phpfiles PHP function ftell() with example

 
 

Share on Google+Share on Google+
PHP function ftell() with example
Posted on: October 30, 2009 at 12:00 AM
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

Advertisement

Related Tags for PHP function ftell() with example:


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.

Posted on: October 30, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com