<?php
$filename="http://www.it300.net/index.asp";
$content=file_get_contents( urlencode($filename) ); 
echo $content;//把$filename使用urlencode进行URL编码后看看行不行
//如果还不行的话,看看php.ini中的allow_url_fopen是不是激活了的
//或者看看是不是$filename地址本身就无法打开
?>

解决方案 »

  1.   

    php.ini文件是不是系统里的啊!我是用的别人的空间,不知道有没有激活啊!怎么看!
      

  2.   

    使用phpinfo()查看allow_url_fopen值是否为On
      

  3.   


    <?
    $filename="http://www.it300.net/index.asp";  
      $content=file_get_contents($filename);  
      echo $content; ?>
    这段代码在我本地电脑上运行是正常的
    应该是你服务器的配置问题
    我的allow_url_fopen是打开的   你可以与空间服务商联系  咨询一下
      

  4.   

    空间是免费的,,看来真的不行了!!呜呜!!!谁那有php空间啊!介绍一个便宜点的,,小弟穷啊!!我要做搜索引擎!
      

  5.   

    开着呢啊!!
    http://s.it300.net/getcode.php
    是这样的!