shell_exec不在后台运行,任何其他解决方案? [英] shell_exec does not run in the background, any other solution?

查看:1091
本文介绍了shell_exec不在后台运行,任何其他解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CentOS上的apache中使用php。
我需要为用户服务,他们可以通过点击删除大文件。
试图使用shell_exec。
,但它不在后台运行。

我的命令:


< >



谢谢!

解决方案

ass&

  $ D_command =nohup rm -rf videos /'$ Mdelete'> / log / deletedfile.log 2>& 1&; 


i'm using php in apache on CentOS. i'm need to serve users, that they can delete big files by click. trying to use shell_exec. but its not run in the background. it runs and make the user wait.

my command :

$D_command="rm -rf videos/'$Mdelete'";

shell_exec($D_command);

thanks!

解决方案

ass & at the end of the command.

$D_command="nohup rm -rf videos/'$Mdelete' > /log/deletedfile.log 2>&1 &";

这篇关于shell_exec不在后台运行,任何其他解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆