• <bdo id='8NETj'></bdo><ul id='8NETj'></ul>
    <i id='8NETj'><tr id='8NETj'><dt id='8NETj'><q id='8NETj'><span id='8NETj'><b id='8NETj'><form id='8NETj'><ins id='8NETj'></ins><ul id='8NETj'></ul><sub id='8NETj'></sub></form><legend id='8NETj'></legend><bdo id='8NETj'><pre id='8NETj'><center id='8NETj'></center></pre></bdo></b><th id='8NETj'></th></span></q></dt></tr></i><div id='8NETj'><tfoot id='8NETj'></tfoot><dl id='8NETj'><fieldset id='8NETj'></fieldset></dl></div>

        <small id='8NETj'></small><noframes id='8NETj'>

      1. <legend id='8NETj'><style id='8NETj'><dir id='8NETj'><q id='8NETj'></q></dir></style></legend>

      2. <tfoot id='8NETj'></tfoot>
      3. Windows机器上的PHP;在后台启动进程

        PHP on a windows machine; Start process in background(Windows机器上的PHP;在后台启动进程)
          <tbody id='4HBmY'></tbody>

              <small id='4HBmY'></small><noframes id='4HBmY'>

                <bdo id='4HBmY'></bdo><ul id='4HBmY'></ul>
                <i id='4HBmY'><tr id='4HBmY'><dt id='4HBmY'><q id='4HBmY'><span id='4HBmY'><b id='4HBmY'><form id='4HBmY'><ins id='4HBmY'></ins><ul id='4HBmY'></ul><sub id='4HBmY'></sub></form><legend id='4HBmY'></legend><bdo id='4HBmY'><pre id='4HBmY'><center id='4HBmY'></center></pre></bdo></b><th id='4HBmY'></th></span></q></dt></tr></i><div id='4HBmY'><tfoot id='4HBmY'></tfoot><dl id='4HBmY'><fieldset id='4HBmY'></fieldset></dl></div>
              • <tfoot id='4HBmY'></tfoot><legend id='4HBmY'><style id='4HBmY'><dir id='4HBmY'><q id='4HBmY'></q></dir></style></legend>

                  本文介绍了Windows机器上的PHP;在后台启动进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在寻找最好的方法,或者任何真正在后台从 php 启动进程的方法,以便稍后在脚本中终止它.

                  I'm looking for the best, or any way really to start a process from php in the background so I can kill it later in the script.

                  现在,我正在使用:shell_exec($Command);这样做的问题是它等待程序关闭.

                  Right now, I'm using: shell_exec($Command); The problem with this is it waits for the program to close.

                  我想要在执行 shell 命令时与 nohup 具有相同效果的东西.这将允许我在后台运行该进程,以便稍后在脚本中将其关闭.我需要关闭它,因为这个脚本会定期运行,运行时程序无法打开.

                  I want something that will have the same effect as nohup when I execute the shell command. This will allow me to run the process in the background, so that later in the script it can be closed. I need to close it because this script will run on a regular basis and the program can't be open when this runs.

                  我曾想过生成一个 .bat 文件以在后台运行命令,但即便如此,我以后如何终止该进程?

                  I've thought of generating a .bat file to run the command in the background, but even then, how do I kill the process later?

                  我看到的linux代码是:

                  The code I've seen for linux is:

                  $PID = shell_exec("nohup $Command > /dev/null & echo $!");
                  // Later on to kill it
                  exec("kill -KILL $PID");
                  

                  编辑:事实证明我不需要终止进程

                  EDIT: Turns out I don't need to kill the process

                  推荐答案

                  请问这个PHP 手册中的函数 帮助?

                  function runAsynchronously($path,$arguments) {
                      $WshShell = new COM("WScript.Shell");
                      $oShellLink = $WshShell->CreateShortcut("temp.lnk");
                      $oShellLink->TargetPath = $path;
                      $oShellLink->Arguments = $arguments;
                      $oShellLink->WorkingDirectory = dirname($path);
                      $oShellLink->WindowStyle = 1;
                      $oShellLink->Save();
                      $oExec = $WshShell->Run("temp.lnk", 7, false);
                      unset($WshShell,$oShellLink,$oExec);
                      unlink("temp.lnk");
                  }
                  

                  这篇关于Windows机器上的PHP;在后台启动进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <tfoot id='VK7hO'></tfoot>
                    <tbody id='VK7hO'></tbody>
                  • <bdo id='VK7hO'></bdo><ul id='VK7hO'></ul>
                      <legend id='VK7hO'><style id='VK7hO'><dir id='VK7hO'><q id='VK7hO'></q></dir></style></legend>

                          <small id='VK7hO'></small><noframes id='VK7hO'>

                        1. <i id='VK7hO'><tr id='VK7hO'><dt id='VK7hO'><q id='VK7hO'><span id='VK7hO'><b id='VK7hO'><form id='VK7hO'><ins id='VK7hO'></ins><ul id='VK7hO'></ul><sub id='VK7hO'></sub></form><legend id='VK7hO'></legend><bdo id='VK7hO'><pre id='VK7hO'><center id='VK7hO'></center></pre></bdo></b><th id='VK7hO'></th></span></q></dt></tr></i><div id='VK7hO'><tfoot id='VK7hO'></tfoot><dl id='VK7hO'><fieldset id='VK7hO'></fieldset></dl></div>