企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
**socket\_write**(resource`$socket`,string`$buffer`\[,int`$length`\= 0\] ) :int 配对:socket\_wirte、socket\_read(一次性读写) ``` $msg='test'; socket_write($socket, $msg, strlen($msg)); //或者 $in = "HEAD / http/1.1\r\n"; $in .= "HOST: localhost \r\n"; $in .= "Connection: close\r\n\r\n"; socket_write($socket, $in, strlen($in)); ```