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

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

      <legend id='X0daZ'><style id='X0daZ'><dir id='X0daZ'><q id='X0daZ'></q></dir></style></legend>

        如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?

        时间:2023-08-20

          1. <small id='V7QjY'></small><noframes id='V7QjY'>

            <tfoot id='V7QjY'></tfoot>

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

                <legend id='V7QjY'><style id='V7QjY'><dir id='V7QjY'><q id='V7QjY'></q></dir></style></legend>
                  <bdo id='V7QjY'></bdo><ul id='V7QjY'></ul>
                  本文介绍了如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们想检查指定的进程当前是否正在通过 PHP 运行.

                  We would like to check if a specified process is currently running via PHP.

                  我们想简单地提供一个 PID,看看它当前是否正在执行.

                  We would like to simply supply a PID and see if it is currently executing or not.

                  PHP 是否有一个内部函数可以为我们提供这些信息,还是我们必须从ps"输出中解析它?

                  Does PHP have an internal function that would give us this information or do we have to parse it out of "ps" output?

                  推荐答案

                  如果你在 Linux 上,试试这个:

                  If you are on Linux, try this :

                  if (file_exists( "/proc/$pid" )){
                      //process with a pid = $pid is running
                  }
                  

                  这篇关于如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:escapeshellarg 和escapeshellcmd 有什么区别? 下一篇:在 Emacs 中编辑 PHP 的好设置是什么?

                  相关文章

                  <legend id='cWwSO'><style id='cWwSO'><dir id='cWwSO'><q id='cWwSO'></q></dir></style></legend>
                    <bdo id='cWwSO'></bdo><ul id='cWwSO'></ul>

                • <tfoot id='cWwSO'></tfoot>
                • <small id='cWwSO'></small><noframes id='cWwSO'>

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