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

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

WBOY
Release: 2016-06-02 11:28:28
Original
1820 people have browsed it

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发现脚本没有执行。

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template