PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PHP 类型比较表> <所支持的套接字传输器(Socket Transports)列表
Last updated: Sun, 25 Nov 2007

view this page in

Unix 领域:Unix 和 UDG

unix:// 自 PHP 3 起可用,udg:// 自 PHP 5 起可用。

  • unix:///tmp/mysock
  • udg:///tmp/mysock

unix:// 提供了在 Unix 域中对套接字流连接的访问。udg:// 提供了替代的传输器以用户数据报协议(UDP)来访问 Unix 域套接字。

Unix 域套接字(UNIX Domain Socket),和 Internet Domain Socket 不同,不期望端口号。在 fsockopen()portno 参数应被设为 0。



add a note add a note User Contributed Notes
Unix 领域:Unix 和 UDG
Matthew Fortune
16-Feb-2007 03:03
It appears that fsockopen prior to php5 did not need the unix:// qualifier when opening a unix domain socket:

php4: fsockopen("/tmp/mysocket"......);

php5: fsockopen("unix:///tmp/mysocket"......);

This caught me out when upgrading.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites