On Fri, Apr 4, 2008 at 11:34 AM, Philip Thompson <[EMAIL PROTECTED]> wrote:
> Is there a set list of return values/error codes returned by exec? I am
> running this command on a windows box and getting the following error:
>
> exec ("net use /delete i: /y", $output, $ret);
> print_r ($output); // Array()
> echo "Return: $ret"; // Return: 2
The third parameter ($ret) isn't defined by the exec() function,
but rather by the program called in the first parameter. I'm not
certain if Windows has a[n easy] way to redirect STDERR to STDOUT, but
if it does, try that. For example:
<?php
exec('./unix-application 2>&1',$ret,$err);
print_r($ret);
echo "Return: ".$err."\n";
?>
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php