但是仍然无法读取。
错误信息:Warning: file_get_contents(): php_network_getaddresses: gethostbyname failed in D:\website\108BUY.COM\forum\shu\test1.php on line 2Warning: file_get_contents(http://www.read8.net): failed to open stream: No such file or directory in D:\website\108BUY.COM\forum\shu\test1.php on line 2
服务器环境变量的地址为:http://forum.108buy.com/shu/test.php

解决方案 »

  1.   

    服务器吗?我刚刚在google上找到一篇文章:http://www.ozoneasylum.com/5778这个似乎是php4311的bug?我的服务器是4.32rc1,就没有这个问题(不同地方的)。
      

  2.   

    Thanks to Hostmatters' excellent help I'm all set. It turns out you have to put only the hostname in fsockopen's first string parameter. IOW 
    PHP Code:
    fsockopen("www.ip-to-location.com/free.asp", 80, $errno, $errstr, 30); is a no go but 
    PHP Code:
    fsockopen("www.ip-to-location.com", 80, $errno, $errstr, 30); is perfectly fine.但是这样不是解决之道。
      

  3.   

    这个似乎是php的bug:http://bugs.php.net/bug.php?id=11058