PHP头条
热点:

php提示Warning: file_get_contents(): couldn’t resolve


   今天在使用一个Caiji功能的使用,突然间出现“

  Warning: file_get_contents() [function.file-get-contents]: couldn't resolve host name in ……

  而本地测试却没有问题,从网上查了一些资料,发现是dns的问题。下面是解决方法:

  用ssh连接linux vps, 修改vps主机的dns。

  vi /etc/resolv.conf

  里面的内容直接修改成:

  nameserver 114.114.114.114

  nameserver 8.8.8.8

  保存即可,不用重启。

  再次测试,OK!

www.phpzy.comtrue/php/16129.htmlTechArticlephp提示Warning: file_get_contents(): couldn’t resolve 今天在使用一个Caiji功能的使用,突然间出现 Warning: file_get_contents() [function.file-get-contents]: couldn't resolve host name in 而本地测试却没有问题,从...

相关文章

    暂无相关文章
相关频道:

PHP之友评论

今天推荐