I would like to display the output of a shell script like it is shown in PuTTy or gnome-terminal via a php-script. I tried using shell_exec by invoking it:
$output = shell_exec('echo "return value: ";foo=$(nameOfFileToExecute); echo $foo');
In which way can I get the return string of the script which is stored on the webserver?