Hi,
I'm trying to echo the output of a shell script, but failing miserably -
I started off with exec, but I gather that won't echo any shell output, and have gotten a little closer by using system($input, $output);
echo $output;
but this echo's 0 if executed, and 2 if there's an error.
So all I can do at the moment is
if ($output==0) echo "Execution successful";
if ($output==1) echo "Execution failed";
I would still like to include the 'if' statements, but have the shell output echo to the screen for debugging etc.
How can I convert the '2' to something useful