Windows上的nohup,无需等待完成即可执行 [英] nohup on windows, exec without waiting for finish

查看:3311
本文介绍了Windows上的nohup,无需等待完成即可执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows是否有类似的东西?

Is there something like this for Windows?

exec("nohup /usr/bin/php -f sleep.php > /dev/null 2>&1 &");

推荐答案

这并不难(尽管有一些细微的区别)...您只需要使用

It's not that hard (albeit with some minor differences)... You just need to use the WScript.Shell COM object:

$shell = new COM("WScript.Shell");
$shell->run($command, 0, false);

就这样...

这篇关于Windows上的nohup,无需等待完成即可执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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