On Sat, 4 May 2002, Liam MacKenzie wrote:
> just a simple question, how would I go about displaying the last 100 lines
> of a log file?
> I know that on the command line it's:
> tail -n 100 access_log
> Is there a PHP function to do this?

Not that I know of, but the process is pretty simple. Seek to the end of 
the file, then read chunks backwards, spitting out a line each time you 
see a line break.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to