", $command, "
";//DEBUG // make sure command exists and is not empty if ($command === "" || empty($command)) { echo "empty query"; die(2); } // execute shell command exec($command, $output, $exitcode); echo "Output is
", join("
", $output), "

";//DEBUG if ( $exitcode == "0" ) { echo "Success"; } else { echo "Command failed with exit code", $exitcode; } ?>