note 18124 added to function.exec
| From: | php-general at lists dot php dot net | Date: | Fri, 11 Jan 2002 10:39:01 +0000 |
| Subject: | note 18124 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24661@lists.php.net to get a copy of this message | ||
When using escapeshellcmd and the stderr to stdout redirect '2>&1'. Append
'2>&1' to the call to escapeshellcmd not within it, otherwise the returning string
is empty rather than containing the error.
$cmd = escapeshellcmd("...")." 2>&1";
$string = exec($cmd,$array,$integer);
--
http://www.php.net/manual/en/function.exec.php
http://master.php.net/manage/user-notes.php?action=edit+18124
http://master.php.net/manage/user-notes.php?action=delete+18124
http://master.php.net/manage/user-notes.php?action=reject+18124