note 40856 deleted from function.shell-exec by cmb

From: Date: Sun, 07 Jul 2019 15:28:42 +0000
Subject: note 40856 deleted from function.shell-exec by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211521@lists.php.net to get a copy of this message
Note Submitter: dj-bj at gmx dot net ---- shell_exec passes the result to a variable only if the result of the command is true. When the result is false the generated page contains the error string in clear text at the position the result was fetched (which can differ from reload to reload). If you would like to recieve also the error messages append 2>&1 to the end of the command you are executing. However, the result is also passed to the page directly. To avoid page destruction you should not fetch the result in your script. By appending >nul to the shell command you can hide any output. Hope this helps.

« previous php.notes (#211521) next »