端口已处于监听状态,为什么 fsockopen还会失败
用netstat -a命令查看, 显示 TCP 0.0.0.0:2012 www:0 LISTENING
可是用PHP socket访问,代码如下:
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->$fp = fsockopen('202.117.xxx.xxx',2012,$errno, $errstr, 10);echo $fp ;
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $connection = socket_connect($socket, '192.168.xxx.xxx', 2012); <div class="clear"></div>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号