首页 > CMS建站 > Phpwind > 正文

PhpWind教程:环境配置打开了allow_url_fopen却无法采集

2020-05-30 21:54:06
字体:
来源:转载
供稿:网友


PHP配置环境中支持file_get_contents、file、fopen打开远程url时总是报错,错误信息如下:
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /usr/vogue/upload/1.php on line 4
Warning: file_get_contents(http://blog.sina.com.cn/myblog/index_rss.php?uid=1190363061)
[function.file-get-contents]: failed to open stream: Connection refused in /usr/vogue/upload/1.php on line 4

问题可能原因:
这可能是服务器DNS出问题,造成了路由结果中有部分路由执行超时,最终PHP执行时间超时,导致采集与RSS导
用到这类型的函数娶不到内容而无法使用此项功能。

解决办法:
检查一下环境是否开始了allow_url_fopen,在服务器上跟踪一下路由是否有断网的节点存在,如存在更换DNS。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选