★ wanayoo — archive 1999 http://fr.php.net/manual/hu/function.ftell.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<fstatftruncate>
view the version of this page
Last updated: Sat, 20 Nov 2004

ftell

(PHP 3, PHP 4 , PHP 5)

ftell -- Tells file pointer read/write position

Description

int ftell ( resource handle)

Returns the position of the file pointer referenced by handle; i.e., its offset into the file stream.

If an error occurs, returns FALSE.

The file pointer must be valid, and must point to a file successfully opened by fopen() or popen().

Példa 1. ftell() example

<?php

// opens a file and read some data
$fp = fopen("/etc/passwd", "r");
$data = fgets($fp, 12);

// where are we ?
echo ftell($fp); // 11

fclose($fp);

?>

See also fopen(), popen(), fseek(), and rewind().



add a note add a note User Contributed Notes
ftell
There are no user contributed notes for this page.

<fstatftruncate>
 Last updated: Sat, 20 Nov 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2004 The PHP Group
All rights reserved.
This mirror generously provided by: nexen.net
Last updated: Fri Nov 26 05:15:47 2004 CET