Return to Snippet

Revision: 7135
at July 9, 2008 15:35 by jdstraughan

Initial Code
$output=shell_exec('command 2>&1');

Initial URL

Initial Description
The “2>&1″ bit tells to pipe the standard error to the standard output. Otherwise the standard error may not be outputted by the system and you won’t have a way to troubleshoot your script.

Initial Title
Linux shell commands from php script

Initial Tags
php, linux

Initial Language