posix_getpid这个PHP函数为什么在WINDOWS下不能运行,只有在LINUX下才能用吗?

如题所述

你好。

posix_getpid 是linux下的函数,在windows是没有的(not implemented),在windows下可以使用get_current_user()。

另外可以使用function_exists('posix_getpwuid')方法来判别是否支持这个函数。

参考资料:http://php.net/manual/en/function.posix-getpwuid.php

温馨提示:答案为网友推荐,仅供参考
相似回答