RE: [PHP] rewind 5 lines
| From: | Jay Blanchard | Date: | Mon, 17 May 2004 20:56:14 +0000 |
| Subject: | RE: [PHP] rewind 5 lines | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186431@lists.php.net to get a copy of this message | ||
[snip]
I have a file where the pointer is set at EOF.
Is it possible, in a very easy way, to rewind it 5 lines? Thereby being
able to return the last 5 lines of the file with "fgets".
[/snip]
Count the lines, subtract five, cycle through the file again and only
get the last five.