Re: system command?
| From: | Adam Voigt | Date: | Mon, 10 May 2004 14:19:55 +0000 |
| Subject: | Re: system command? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185800@lists.php.net to get a copy of this message | ||
I believe when you add the -f flag, the tail command doesn't exit, it
just keeps printing as data is appended to the log, did you try dropping
the -f flag?
On Mon, 2004-05-10 at 10:15, Jas wrote:
> Anyone know what this wouldn't work? I have tried using a couple of
> functions defined at http://us2.php.net/manual/en/ref.exec.php
> and none
> seem to have the desired effect.
>
> <?php
> $tailed = shell_exec('tail -f /path/to/log');
> //$tailed = exec('tail -f /path/to/log');
> //$tailed = system('tail -f /path/to/log');
> print = "<textarea>$tailed</textarea>";
> ?>
>
> Thanks in advance,
> Jas
--
Adam Voigt
adam@kotisprop.com