How to get PID from PHP function exec() in Windows?

后端 未结 4 712
离开以前
离开以前 2021-02-08 16:53

I have always used:

$pid = exec(\"/usr/local/bin/php file.php $args > /dev/null & echo \\$!\");

But I am using an XP virtual machine to

4条回答
  •  后悔当初
    2021-02-08 17:17

    You will have to install an extra extension, but found the solution located at Uniformserver's Wiki.

    UPDATE

    After some searching you might look into tasklist which coincidently, you may be able to use with the PHP exec command to get what you are after.

提交回复
热议问题