On 22-Jun-2003 Mattia wrote:
> How to execute a command capturing the stanndard error, in addition to
> standard output? example:
>
> echo system('/bin/rm ...');
>
> I need to know when this command fails, and when it fails, i need to
> know why. Any hints?
>
> _Mattia_
>
$cmd='/bin/rm foo';
exec("$cmd 2>&1", $output);
-- or --
exec($cmd, $output, $errno);
echo posix_strerror($errno);
-- or --
proc_open(...) and read from pipe[2]
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php