note 38499 deleted from function.ftell by nlopess
| From: | nlopess@php.net | Date: | Wed, 24 Dec 2003 13:44:24 +0000 |
| Subject: | note 38499 deleted from function.ftell by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62412@lists.php.net to get a copy of this message | ||
Note Submitter:
----
[quote]
Another (and more convenient) way to make ftell() to return a true pointer for appended file is just
issue fseek() before:
$n=fopen($name,'a+'); // open for append
echo ftell($n); // 0
fseek($n, 0 , SEEK_END); // set to EOF... hm! and where we was before?
echo ftell($n); // 3547843 or something :)
jz
[/quote]
To get the true pointer for an appended local file you better just get the filesize!
echo filesize($file);