©
This document uses PHP Chinese website manual Release
这里描述的socket函数只是PHP扩展的一部分,编译PHP时必须在配置中添加--enable-sockets 配置项来启用。
Note: 在 PHP 5.0.0 开始加入了对 IPv6 的支持。
[#1] Dirk [2009-01-04 12:32:26]
Note that under windows you just need to uncomment the line
;extension=php_sockets.dll
so that it looks like
extension=php_sockets.dll
(without the ; at the start)
in your php.ini (in the directory c:\program files\PHP\php.ini)
If that line isn't in there, you probably have a custom php install. In that case you need to add the line to php.ini and download the sockets dll.
In order to get the php_sockets.dll:
- Download the regular php zip file from http://www.php.net/downloads.php
- Find the dll in the ext directory
- Extract the php_sockets.dll to the ext directory of your install
(probably at c:\program files\PHP\ext)