exec 返回127,该如何解决
Jun 13, 2016 pm 01:46 PM
exec 返回127
exec($command,&$output,&$result);
echo $result;die();
result返回127
命令没找到
这个什么概念,如何解决?
------解决方案--------------------
是执行一个外部程序吗?和其他语言语法差不多啊!
------解决方案--------------------
在做后门程序?
------解决方案--------------------
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."

인기 기사

인기 기사

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Laravel Back End : Part 2, React가있는 React 앱 구축

PHP의 컬 : REST API에서 PHP Curl Extension 사용 방법
