note 23675 deleted from function.shell-exec by dams

From: Date: Sat, 27 Jul 2002 13:03:34 +0000
Subject: note 23675 deleted from function.shell-exec by dams
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-33638@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.

« previous php.notes (#33638) next »