PHP system("ls -l",$ret_var) 执行结果返回127

WBOY
Release: 2016-06-23 13:52:16
Original
2804 people have browsed it

各位大神好啊,小弟 最近在ARm板上架了一个lighttpd,并且配置了PHP5.4,但是我编写的PHP文件调用本地可执行文件的时候,返回值为127,这是一个没有找到命令的错误返回值,我现在讲我写的测试程序C test放在默认可执行本地程序的目录/usr/bin下还是返回127,绝对路径,相对路径都尝试了,一直不行,把PHP.INI的error调试打开也看不到错误。还有修改文件夹和文件的权限755也都尝试了。求各位大神指导,要在PHP.INI里面修改些什么。5.4版本的里面以及没有safe_mode和with-exec-dir这个选项,求大神指点,谢谢


回复讨论(解决方案)

参见
1.exec() - Execute an external program
2.passthru() - Execute an external program and display raw output
3.popen() - 打开进程文件指针
4.escapeshellcmd() - Escape shell metacharacters
5.pcntl_exec() - 在当前进程空间执行指定程序
6.backtick operator

?保??:
1.php.ini?有禁用上?列出的?行函?
2.被?行的文件所有者和PHP文件的所有者相同
3.被?行文件要有07xx?限

请问这个问题解决了吗?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!