1:header("Location:url");
2:exit()、die()

解决方案 »

  1.   

    同意楼上的
    void exit ( [string status])
    void exit ( int status)
    注意:Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP
      

  2.   

    PHP重定向 方法一:header("Location: index.php"); 
    方法二:echo "<script>window.location =\"$PHP_SELF\";</script>"; 
    方法三:echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=index.php\">"; 
    <FORM ACTION="<? echo "$PHP_SELF"; ?>" METHOD="POST">