Home > Backend Development > PHP Tutorial > LINUX停用PHP调用系统指令

LINUX停用PHP调用系统指令

WBOY
Release: 2016-06-13 11:20:28
Original
905 people have browsed it

LINUX下用PHP调用系统指令
在linux环境下,我用PHP的System()调用系统指令,如果是system("ls")这样的,是可以实现的,如果是system("cp file_path1 file_path2")则会失败。若是用C的SYSTEM()执行CP操作,是成功的。我做过其他测试,用C写了一个文件复制程序,如果,将源文件路径写死在C里,那么文件是可以访问到的,如果,是用参数的形式将文件路径传进去,若是用C的system()则可以执行成功,若是用PHP的system()则返回的文件指针为NULL。请问哪位遇到过类似的情况,能否帮忙解决下,谢谢了。


------解决方案--------------------
注意你执行php的用户的权限
------解决方案--------------------
应该是权限的问题吧
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