Warning: file_get_contents() [function.file-get-contents]: couldn't resolve host name infile_get_content() 如果填IP..就可以..域名就报错!  DNS没问题...我在linux下ping域名正常!allow_url_open已打开.....现在的情况就是..... curl和file_get_content都不能用域名!

解决方案 »

  1.   

    你可以把你的代码写出来,不过域名一般的方法是这样的,$url="http://www.xx.com";$content=file_get_contents($url);
    代码这样就正常,但域名保证没问题http://不要省略
      

  2.   

    用IP也必须要加http://   域名当然肯定也要http://  应该是linux服务器..哪里配置出了问题.
      

  3.   


    var_dump(ini_get('allow_url_fopen'));
    //你所说的allow_url_open 是allow_url_fopen吗?
      

  4.   

    string(1) "1"  是开的
      

  5.   


    把你可以使用的ip地址这样输出看看域名$hostname = gethostbyaddr("204.15.192.194");echo $hostname;