Re: Tailing a log file {!?}
| From: | Liam MacKenzie | Date: | Sat, 04 May 2002 08:43:35 +0000 |
| Subject: | Re: Tailing a log file {!?} | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-96134@lists.php.net to get a copy of this message | ||
I have PHP's safe mode enabled, can't use backticks.
And no I can't disable it, I'm hosting a few hundred sites =)
I looked up "return_var" in the manual and got nothing, had a read of
return() but don't quite understand how that would benefit what's happening.
Could you please give an example?
Thanks!
Liam
----- Original Message -----
From: "Jason Wong" <php-general@gremlins.com.hk>
To: <php-general@lists.php.net>
Sent: Sunday, May 05, 2002 6:40 PM
Subject: Re: [PHP] Tailing a log file {!?}
On Saturday 04 May 2002 16:25, Liam MacKenzie wrote:
> $cmd = exec("tail -n $len /www/hosting/domains/lanolot/logs/$open",
> $result);
>
> echo "$cmd";
>
> Still returns nothing under the top text.
>
> All log files are chmodded 644 and are owned by the web server.
> The paths to the files are correct.
That's not what I meant by 'return_var', check the manual.
> I've run out of ideas =(
I prefer something simpler than exec(), try:
$output =
tail -n $len /www/hosting/domains/lanolot/logs/$open;
echo $output;
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
This fortune is inoperative. Please try another.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php