Re: Tailing a log file {!?}
| From: | Tom Rogers | Date: | Sun, 05 May 2002 06:35:56 +0000 |
| Subject: | Re: Tailing a log file {!?} | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96115@lists.php.net to get a copy of this message | ||
Hi
You need
exec("tail -n 100 access_log",$result);
$result will be an array with the output of the command.
see http://www.php.net/manual/en/ref.exec.php
for more info
Tom
At 01:51 PM 4/05/2002, Liam MacKenzie wrote:
Hi guys, 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? Cheers, Liam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php