程序员 - 如何判断PHP是否支持socket

WBOY
Release: 2016-06-06 20:46:14
Original
1791 people have browsed it

如下图,如何判断是否支持socket,有没有专门的函数来判断。
我用extension_loaded('socket')来判断不行。

程序员 - 如何判断PHP是否支持socket

回复内容:

如下图,如何判断是否支持socket,有没有专门的函数来判断。
我用extension_loaded('socket')来判断不行。

程序员 - 如何判断PHP是否支持socket

应该是extension_loaded('sockets')

要启用,打开当前PHP版本所用的php.ini,把extension=php_sockets.dll前面的注释(分号)去掉.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!