note 23675 added to function.shell-exec
| From: | joelle dot stringer at sun dot com | Date: | Wed, 24 Jul 2002 17:23:51 +0000 |
| Subject: | note 23675 added to function.shell-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33518@lists.php.net to get a copy of this message | ||
Hello All,
Can someone help me out?
I am using shell_exec to call an expect script. Everything outputs correctly, however, I can't
figure out how to get the exit status that the expect file returned. I tried outputing
shell_exec(echo $status), but it seems to always be returning "\n"(for whatever reason).
Does anyone have experience with this or know what the problem could be?
Thanks,
Joelle
<?
$ouput = shell_exec(./expect ./roll.exp);
echo(nl2br($ouput));
echo(nl2br(shell_exec(echo $status));
?>
I know if I enter this directly in shell everything works fine.
--
http://www.php.net/manual/en/function.shell-exec.php
http://master.php.net/manage/user-notes.php?action=edit+23675
http://master.php.net/manage/user-notes.php?action=delete+23675
http://master.php.net/manage/user-notes.php?action=reject+23675