我在一个PHP 工程中,用file获取远程页面的内容.
$lines = file(http://www.dot.fm/whois.cfm?domain=google.fm);其他网址$line都有值,只有这个网站http://www.dot.fm/whois.cfm?domain=google.fm
的内容获取不到,大家有什么高招么?支持有一 下!

解决方案 »

  1.   

    怪事,为啥我就能得到呢?
    $lines = file('http://www.dot.fm/whois.cfm?domain=google.fm');
    print_r($lines);
      

  2.   

    查查配置文件 allow_url_fopen
      

  3.   

    file的参数要加引号~~
    取得到内容,只不过前82行是空的。
      

  4.   

    引号是有的,
    <?php
    $lines = file('http://www.dot.fm/whois.cfm?domain=google.fm'); 
    print_r($lines);
    ?>
    但是返回只有Array
    (
    )
    而且是空的,其他的网址都有内容!!大家还有什么办法么?
      

  5.   

    结果知道了,原来是服务器站点不能访问'http://www.dot.fm/whois.cfm?domain=google.fm'