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;却无法执行,其各位大神讲解?
在php中调用shell脚本
-
- 帖子: 3
- 注册时间: 2014-11-09 9:44
- 系统: ubuntu14.04
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
-
- 帖子: 3
- 注册时间: 2014-11-09 9:44
- 系统: ubuntu14.04
Re: 在php中调用shell脚本
谢谢。是权限问题!