如何在php 5.4中启用exec?

时间:2016-02-29 11:23:41

标签: exec

我尝试运行exec,shell_exec不能在php5.4中运行。我没有找到" Safe_mode"在php.ini中(也读取此删除)。任何解决方案?,帮助我!

1 个答案:

答案 0 :(得分:0)

Prove all, and finally the solution for me is(uniformPortalServer): 

pclose(popen(“start / B”。$ cmd,“r”));

function execInBackground($cmd) {
    if (substr(php_uname(), 0, 7) == "Windows"){
        pclose(popen("start /B ". $cmd, "r")); 
    }
    else {
        exec($cmd . " > /dev/null &");  
    }
}