exec() (or like functions) pass back error output

koko77

New Member
I can pass back output of the executed script, but I get no error output if the script errors out.\[code\]// This is a file that doesn't exists, for testing$command = './path/to/non/existing/script.sh';$commandOutput = exec($command, $commandOutput); // works but no error output//passthru($command, $commandOutput); // works but error output was 127 not file not found//$commandOutput = escapeshellcmd($command);echo "The Output:\n|".$commandOutput."|\n";var_dump($commandOutput);The Output:||\[/code\]I would like the output of the error message:\[code\]The Output:|file not found|\[/code\]How or what function/parameter would do this?
 
Back
Top