php file.php &

如何file.php得到后台进程的PID?

有帮助吗?

解决方案

我相信你正在寻找的功能getmypid()

http://php.net/manual/en/function.getmypid.php

posix_getpid()似乎做同样的事情...

http://php.net/manual/en/function.posix -getpid.php

其他提示

getmypid() 做你所需要的。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top