PHP exec或shell_exec未在Windows Wamp上返回进程id(PID)

PHP exec或shell_exec未在Windows Wamp上返回进程id(PID),php,windows,ffmpeg,shell-exec,pid,Php,Windows,Ffmpeg,Shell Exec,Pid,我在Windows7上,使用WampServer,并尝试使用FFMPEG 编码工作正常,但我无法从exec()获取进程id 方法也不是shell\u exec()方法 这是我的代码: $cmd = C:\ffmpeg\bin\ffmpeg.exe -i "C:\...\4ch.wav" -ar 44100 -ab 48000 -f mp3 -y "C:\...\enc_4ch.mp3" 这就是我试图对shell_exec所做的: shell_exec("nohup $cmd > /de

我在Windows7上,使用WampServer,并尝试使用FFMPEG

编码工作正常,但我无法从
exec()获取进程id
方法也不是
shell\u exec()
方法

这是我的代码:

$cmd = C:\ffmpeg\bin\ffmpeg.exe -i "C:\...\4ch.wav"  -ar 44100 -ab 48000 -f mp3 -y "C:\...\enc_4ch.mp3"
这就是我试图对shell_exec所做的:

shell_exec("nohup $cmd > /dev/null & echo $!");
与exec:

exec("nohup " . $this->_command . " > /dev/null 2>/dev/null &") ; // returns null
exec("nohup " . $this->_command . " > /dev/null 2>&1 &"); // also returns null 
请让我知道我做错了什么,因为我希望稍后使用以下方法检查我的进程是否仍在运行:

private function is_process_running($proccess_id) 
    { 
        exec("ps $proccess_id", $process_state);
        return (count($process_state) >= 2);
    }

感谢您在advace中使用
echo$
获取进程ID,而该特定命令在Windows上不可用,因为它是unix shell命令。“过程”链接应该有效:

您的意思是使用任务列表?