您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php中fsockopen详细实例代码

2024/5/15 5:19:38发布29次查看
n;}//如果创建成功else { //接受连接 while ($conn = stream_socket_accept($socket)) { //写入数据 fwrite($conn, 'the local time is ' . date('n/j/y g:i a') . n); //关闭连接 fclose($conn); } //关闭socket fclose($socket);}//$file = test.txt; //定义文件$fp = fopen($file, w); //打开数据流if ($fp) //如果成功打开{ stream_set_write_buffer($fp, 0); //设置缓冲区 fwrite($fp, $output); //写入内容 fclose($fp); //关闭数据流 }
永久链接:
转载随意!带上文章地址吧。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product