当前位置: 代码迷 >> 综合 >> PHP 查询本文件执行的进程数
  详细解决方案

PHP 查询本文件执行的进程数

热度:103   发布时间:2023-10-20 05:32:15.0
     /*** User: yuzhao* CreateTime: 2018/11/26 下午8:20* Description: 获取进程数量*/public static function getProcessNum($keyWord) {$command = "ps -ef |grep -v grep | grep " . $keyWord . " | wc -l";exec($command, $res);return $res[0];}

eg

getProcessNum('tuzisir.php');
  相关解决方案