在php中调用shell脚本
发表于 : 2014-11-09 9:51
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;却无法执行,其各位大神讲解?
#!/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;却无法执行,其各位大神讲解?