At 25.03.2002  14:26, you wrote:
>
>Perhaps it is how I am calling the $lines in a while loop.?  I have tried
>`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
>system(), shell_exec().  None of them let me capture the STDOUT from the
>program.  There has to be a way to do this.   Anyone?
>
>Thanx
>
>exec()
>
>
>I just realized why nothing I was trying for the regular expressions wasn't
>working.  The command I am running is a C program on the command line of a
>Linux box.  I can't capture the output, it just gets output onto the screen.
>I just echo'd $output after the command was run and it was empty.  Any
>ideas?
<big snip>
even if think your output must come to $output,
an alternative, whenever not so elegant is
exec("your_program_name > tmp.file");
the output will be redirected '>' to the file tmp.file.
then you can open the file using the known fopen(*) command,
and read, processed conventional.
HTH Oliver


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

Reply via email to