Posted by Peter van Schie on 07/08/06 00:50
Robert S schreef:
> I would like to display error messages put out by shell commands. For
> example the following code gives no output and the array $output has no
> values:
>
> <?php
> exec( 'lss', $output );
> var_dump( $output );
> ?>
How about just:
<?php
$strRawOutput = exec( 'lss', $output );
var_dump($strRawOutput);
?>
This only retrieves the last output line though. If you need more then
you should use passthru() instead of exec().
HTH,
Peter.
--
http://www.phpforums.nl
Navigation:
[Reply to this message]
|