【发布时间】:2015-03-08 19:30:13
【问题描述】:
echo shell_exec('ls');
工作正常。
但试图复制一些东西:
echo shell_exec('cp index.php temp/index.php');
它没有显示任何错误,但它没有复制。 我正在使用带有 phpcgi 的 nginx。
【问题讨论】:
-
可能是权限问题
-
在 php copy() 函数中复制也很有效。所以我必须在哪里设置权限?如何授予 nginx/php 全部权限?
-
你运行的是什么操作系统?如果它是 Red Hat 发行版,你有 SELinux 强制执行吗?
标签: php nginx permissions shell-exec