我正在尝试从php前端运行shell脚本
下面是shell文件(run.sh chmod到777)
#!/bin/bash
wget -O index.html http://markets.usatoday.com/custom/usatoday-com/html-mktscreener.asp
python hw7-9.py index.html
echo "done";
Run Code Online (Sandbox Code Playgroud)
继承了php前端
<?php
$output = shell_exec("run.sh");
echo "<pre>$output</pre>";
?>
Run Code Online (Sandbox Code Playgroud)
但它的php页面除了返回任何内容
<pre></pre>
Run Code Online (Sandbox Code Playgroud)