久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      PHP如何重定向?淺談跳轉(zhuǎn)頁(yè)面的3種方法

      用戶(hù)登錄功能時(shí)往往需要重定向頁(yè)面,那么在PHP中如何重定向頁(yè)面?下面本篇文章給大家介紹三種重定向網(wǎng)頁(yè)跳轉(zhuǎn)頁(yè)面的方法。

      PHP如何重定向?淺談跳轉(zhuǎn)頁(yè)面的3種方法

      第一種:利用header()函數(shù)進(jìn)行重定向,這也是我用的較多的。(注意!locationhe和“:”之間不能有空格,否則無(wú)作用!)

      <?php     header('content-type:text/html;charset=uft-8);     //重定向頁(yè)面     header('location:index.php');  ?>

      第二種:利用HTML 頭部中的 meta標(biāo)簽,定義http-equiv=refresh 和content=”跳轉(zhuǎn)花費(fèi)的時(shí)間(秒為單位);url=跳轉(zhuǎn)地址”

      <!DOCTYPE html> <html> <head>     <meta charset="UTF-8">     //跳轉(zhuǎn)頁(yè)面,跳轉(zhuǎn)時(shí)間:3秒鐘,目標(biāo)地址:index.php     <meta http-equiv="refresh" content="3;url=index.php">     <title>skip...</title> </head>

      或者

      <?php header('content-type:text/html;charset=utf-8'); $url='index.php';  ?>  <!DOCTYPE html> <html> <head>     <meta charset="UTF-8">     //跳轉(zhuǎn)頁(yè)面,跳轉(zhuǎn)時(shí)間:2秒鐘,目標(biāo)地址:index.php     <meta http-equiv="refresh" content="2;url=<?php echo $url; ?>">     <title>skip...</title> </head>

      第三種:利用javascript進(jìn)行跳轉(zhuǎn)

      <?php header('content-type:text/html;charset=utf-8'); $url='index.php'; //立即跳轉(zhuǎn)至目標(biāo)頁(yè)面 echo <script>window.location.href='$url';</script>; ?>

      推薦學(xué)習(xí):《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)