Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在win XP上运行PHP,我exec()在我的程序中使用了一些东西,但每次exec()运行cmd.exe时,服务器上都会打开一个窗口几秒钟。我怎样才能让它在后台运行?
exec()
cmd.exe
在命令前加上start /B.
start /B
$process = popen("start /B ". $cmd, "r");
https://www.php.net/manual/function.exec.php#86329
$WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run('yourprogpath', 0, false);
仅限窗户。
编辑 - 我认为 Fraxtil 的答案可能会更好,如果它适用于 Windows 和 unix。
我知道这类问题有一些解决方案,并为这个问题应用了一些解决方案,但我无法解决,我很困惑。请帮我。这是代码:
protected String doInBackground(Boolean... params) {
1 android - 使用 Animation.setStartOffset 同步音频(MediaPlayer)
1 c# - 什么是真实透明的代理
1 java - 请求所有帐户用户时出现 Google Directory API 403 Insufficient Permission 错误
1 django - Django HttpResponseRedirect 找不到 url
4 python - Scipy.optimize:如何限制参数值
3 mysql - MySQL GROUP_CONCAT 和 DISTINCT
1 wordpress - 如何显示当前正在查看的页面的最新修订日期和作者?
1 android - Android Gallery 子 onClickListener
1 javascript - Javascript 使用 &signs 解析远程 xml
Reference php × 1429865 c/c++ × 756500 nginx × 49975 mongodb × 159057 mybatis × 3233 anaconda × 13410 pycharm × 14671 python × 1902243 vscode × 56040 docker × 110988 github × 49000 flask × 49129 ffmpeg × 24037 jmeter × 16910 matplotlib × 63493 bootstrap × 54641