文字

win32_ps_list_procs

(PECL win32ps >= 1.0.1)

win32_ps_list_procsList running processes

说明

array win32_ps_list_procs ( void )

Retrieves statistics about all running processes.

返回值

Returns FALSE on failure, or an array consisting of process statistics like win32_ps_stat_proc() returns for all running processes on success.

参见

  • win32_ps_stat_proc() - Stat process

用户评论:

[#1] cf at chronofish dot com [2007-09-10 11:27:44]

For those of you in the WAMP environment, here is a little function that you may find handy:

<?php
function kill_proc($processName)
{
    @
$processList win32_ps_list_procs();
    foreach (
$processList as $processArray)
    {
        
$pid $processArray['pid'];
        if (
basename($processArray['exe']) == $processName)
        {            
            `
taskkill /f /PID $pid 2>&1`;                    
        }
    }
}
?>


-CF

上一篇: 下一篇: