Re: Tailing a log file {!?}

From: Date: Sat, 04 May 2002 08:06:50 +0000
Subject: Re: Tailing a log file {!?}
Groups: php.general 
Request: Send a blank email to php-general+get-96129@lists.php.net to get a copy of this message
It returns nothing It's got me stumped ----- Original Message ----- From: "Jason Wong" <php-general@gremlins.com.hk> To: <php-general@lists.php.net> Sent: Sunday, May 05, 2002 5:58 PM Subject: Re: [PHP] Tailing a log file {!?} On Saturday 04 May 2002 15:32, Liam MacKenzie wrote: > OK, I did this and it does nothing but cause a loop and crash my browser... > > <? > exec("tail -n 100 /www/logs/access.log",$result); > > for ($i=0; $i<$result; $i++) > { > echo "$result<BR>"; > } > ?> > > What's the problem with that? An infinite loop most likely. Remember, $result is an array. Try: foreach ($result as $val) { echo "$val<br>"; } -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* This is National Non-Dairy Creamer Week. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#96129) next »