分页: 1 / 1

在php中调用shell脚本

发表于 : 2014-11-09 9:51
gxwu
test.sh 脚本如下:
#!/bin/bash
echo "hello";
echo "hello" > 1.txt;

在一个php页面中用echo shell_exec("/var/www/html/ftp_upload/test.sh");调用test.sh这个脚本,其中能够执行echo "hello",这条语句,但是echo "hello" > 1.txt;却无法执行,其各位大神讲解?

Re: 在php中调用shell脚本

发表于 : 2014-11-09 14:58
eexpress
一层管一层的权限吧。

Re: 在php中调用shell脚本

发表于 : 2014-11-09 17:45
gxwu
谢谢。是权限问题!