请问php页面重定向有哪些方式,对于通过传递id值而产生新的页面该怎么实现?php 页面重定向php

解决方案 »

  1.   

    一、header("location: http://....");
    注意点:1.header之前不能有其他输出。
    2.header重定向后及时exit防止后续语句被执行。二、HTML中的META
    <HEAD> 
    <META HTTP-EQUIV="REFRESH" CONTENT="5; URL='<?php echo $url;?>' "> 
    </HEAD> 三、写js
    echo "<script language=\"JavaScript\">location.href='$url'</script>"; 传递过来的变量直接附在url后即可传入下一页面,$url = 'http://xxx.com/a.php?a='."$a";
      

  2.   

    header("location: http://www.sina.com.cn/?a=1111");