您知道在Windows中是否有一种方法可以计算通过PHP运行的进程数吗?
如有任何帮助,我们将不胜感激。
是的,通过简单的谷歌搜索,您可以使用以下内容:
http://php.net/manual/en/function.win32-ps-list-procs.php
$processList = win32_ps_list_procs();
if($processList === false) {
// Do error handling here. We use die() for example
die('Failed to obtain the list of processes');
}
$count = count($processList);