Home  >  Article  >  Backend Development  >  如何通过php页面来调用shell脚本

如何通过php页面来调用shell脚本

WBOY
WBOYOriginal
2016-06-02 11:28:281785browse

phpshell

有一个php文件a.php,内容为
system("/home/wwwroot/default/build/make.sh");
?>

make.sh的内容为
#!/bin/bash
#set -x
mkdir aaaaaaaaaaaaa

我在服务器上直接运行a.php可以正常调用make.sh,现在想通过浏览器访问a.php来调用这个shell脚本,然后在浏览器上访问a.php发现脚本没有执行。

大神们帮我看看是哪有问题

Statement:
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