$cmd = "java -version;"
$cmd = "echo $?";
$ret = shell_exec($cmd);
if ($ret == 0) {
echo "Run success";
} else {
echo "Get problem";
}
Title:
shell_exec - How to know command ran ok?
Description:
$cmd = "java -version;" $cmd = "echo $?"; $ret = shell_exec($cmd); if ($ret == 0) { echo "Run success"; } else...
...
Rating:
4