还是不行啊,我在header("location:$url")前echo $url,是正常的,但是以上两个方法都不行。

解决方案 »

  1.   

    问题是你的url是怎么写的?www.cirrt.com可能不行,但是http://www.cirrt.com却是可以的。
      

  2.   

    header("location:$url")
    前面不能输出。
    把echo $url;放到后面试试
      

  3.   

    Cannot add header information - headers already sent by (output started at c:\apache\htdocs\index.php3:18) in c:\apache\htdocs\index.php3 on line 19
    提示这个错误
      

  4.   

    echo $url  
    是http://www.cirrt.com这样的
      

  5.   

    在header("location:".$url);后echo的话,就是找不到该页面
      

  6.   

    试试:
    header("location: http://www.sohu.com");