note 59231 added to function.exec
| From: | simoncpu at osu1 dot php dot net | Date: | Wed, 30 Nov 2005 07:48:20 +0000 |
| Subject: | note 59231 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99344@lists.php.net to get a copy of this message | ||
Sometimes, it is convenient to let exec() return the status of the executed command, rather than
return the last line from the result of that command. In Unix, just do:
$ret = exec('foo; echo $?');
Remember not to overdo it though. ;)
[ simon.cpu ]
----
Manual Page -- http://www.php.net/manual/en/function.exec.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59231
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59231&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59231&report=yes
Search -- http://master.php.net/manage/user-notes.php