我有一台服务器(测试),它具有我可以运行CLI的“php”命令。其他服务器(托管)只能使用“php5-cli”命令运行。 例子: exec("php file.php"); // Works on test server
exec("php5-cli file.php"); // Works on hosting server
如何将我的脚本检测要使用哪一个?
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
System.out.p