header
比如
header("lcoation: http://www.csdn.net")

解决方案 »

  1.   

    header("location: http://www.csdn.net");刚才写错了
      

  2.   

    <?phpif(empty($HTTP_POST_VARS["subject"]))
    {echo "主题";
    header("location: error.php");
    echo "测试";
    }
    ?>主题
    Warning: Cannot modify header information - headers already sent by (output started at E:\test\chkpost.php:4) in E:\test\chkpost.php on line 5
    测试
      

  3.   

    Header之前不能有任何输出!
    <?phpif(empty($HTTP_POST_VARS["subject"])){
      header("location: error.php");
    }?>