Re: Return Code

From: Date: Thu, 28 Dec 2000 04:27:44 +0000
Subject: Re: Return Code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32045@lists.php.net to get a copy of this message
Add a couple more arguments: exec("/path/to/binary", $output, $error); while (list(,$line) = each($output)){ echo $line,"<BR>\n"; } if ($error){ die("OS Error. Use man errno. Usually path/permissions"); } ----- Original Message ----- From: <o.cook@etoncollege.org.uk> Newsgroups: php.general Sent: Wednesday, December 27, 2000 1:16 PM Subject: [PHP] Return Code > How is it possible to get the return code from an external program? > > For instance if I am running a PHP script from the commandline which > contains this command: > > exec("/path/to/binary"); > > How would I get the exit code that the binary returns? > > With regards, > > Ollie > > --- > Do radioactive cats have 18 half-lives? > > http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x53D29567 > --- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32045) next »