0

这是我的脚本:

<?php echo $_POST['titel'];
echo "<br>send into query.<br>(";
echo $_POST['link'].")";

//$fullcmd="./test.sh ".$_POST['titel']." ".$_POST['link'];

$fullcmd="nohup ./converter.sh ".$_POST['titel']." ".$_POST['link'];

`$fullcmd & >/dev/null 2>/dev/null &`;

?>

<br><a href='converter.php'>Go back to main page (there will be displayed your download)
</a>

</body>

</html>

我只想立即执行 php 脚本,而不是等待$fullcmd... nohup 或 & 或 >/dev/null 的返回值,但这里对我没有任何作用:(

我知道这样的事情有多不安全!=)(以及它有多不安全)

希望您理解问题并得到答案!=)(环境:工作文件夹上具有 777 权限的标准灯服务器(用于测试))只是为了说明:脚本已执行,但在提交表单后它等待完整的 .sh 脚本完成,我想要解决。

4

0 回答 0