PHP:
if(true)
    header("Location:xxx.phpp");JS:
<script>
setTimeout("window.location='xxx.php'",2000);//2000毫秒
</script>HTML:
<meta http-equiv="refresh" content="5;url=xxx.php">
<!--5秒钟自动转向-->都一样用

解决方案 »

  1.   

    补充.你也可以用include包含
      

  2.   

    javascript;
    <script language="JavaScript">
        window.location.href="xxx.php";
    </script>
      

  3.   

    <script>
    this.location.href="xxx.php";
    </script>
      

  4.   

    谢谢各位哥们;我有一个问题
    用include 包含能事先也面条转吗??
      

  5.   

    PHP:
    header("Location: xxx.php");
    但在这之前不能有输出
    JS:
    <script>
    window.location="xxx.php"
    </script>
    我认为上面这个最好,可以在任何程序中把它打印出来就行了
    HTML:
    <meta http-equiv="refresh" url=xxx.php">
    整页跳转,不能进行判断
      

  6.   

    to 猴子哥 
     用 
    <?
     if(...)
       {....
    ?>   
    <meta http-equiv="refresh" url=xxx.php">
    <?  }//end if
    ?>
    应该可以把
      

  7.   

    <?
     if(...)
       {....
    ?>   
    <meta http-equiv="refresh" url="5;xxx.php">
    <?  }//end if
    ?>