exec($command,&$output,&$result);
echo $result;die();result返回127 
命令没找到
  这个什么概念,如何解决?

解决方案 »

  1.   

    是外部程序  不是PHP的
      

  2.   

    exec函数第三个参数是执行命令的状态,返回127是说明, 你执行命令的路径不对, 或没有权限等等下面是127错误文档解释"Remember to use the full path (IE '/usr/local/bin/foo' instead of 'foo') when using passthru, otherwise you'll get an exit code of 127 (command not found).
    Remember, you'll also get this error if your file does not have executable permission.""If you have chrooted apache and php, you will also want to put /bin/sh into the chrooted environment. Otherwise, the exec() or passthru() will not function properly, and will produce error code 127, file not found."