各位大神,运行的时候,出现这个问题是什么原因呢
PHP Warning:file_get_contents(http://chat.test.com:3080/login?uid=1&name=admin&type=0): failed to open stream: Connection timed out in file /www/wwwroot/chat.test.com/api/controller/room.php on line 138
#0 : mpf\core\ErrorHandler->handleError(2, 'file_get_conten...', '/www/wwwroot/ch...', 138, Array)
#1 /www/wwwroot/chat.test.com/api/controller/room.php(138): file_get_contents('http://chat.cdn...')
#2 : api\controller\room->indexAction()
#3 /www/wwwroot/chat.test.com/vendor/dzgz/mpf/src/route/Route.php(39): call_user_func(Array)
#4 /www/wwwroot/chat.test.com/public/api.php(51): mpf\route\Route->run()
#5 {main}
PHP Warning:file_get_contents(http://chat.test.com:3080/forbiddenList): failed to open stream: Connection timed out in file /www/wwwroot/chat.test.com/api/controller/room.php on line 140
#0 : mpf\core\ErrorHandler->handleError(2, 'file_get_conten...', '/www/wwwroot/ch...', 140, Array)
#1 /www/wwwroot/chat.test.com/api/controller/room.php(140): file_get_contents('http://chat.cdn...')
#2 : api\controller\room->indexAction()
#3 /www/wwwroot/chat.test.com/vendor/dzgz/mpf/src/route/Route.php(39): call_user_func(Array)
#4 /www/wwwroot/chat.test.com/public/api.php(51): mpf\route\Route->run()
#5 {main}
连接超时一般是防火墙和安全组没开放对应端口,看下3080防火墙 安全组开了没?
还有 test.com 得在你这个报错的服务器上配置个host才能正确访问你的ip
谢谢,服务器上的3080防火墙是有打开的,本地的HOST也有配置
我用的面板是BT的
面板上显示的3080的端口有开放,就是在BT面板上面显示的状态是末使用