久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php如何實(shí)現(xiàn)判斷手機(jī)端進(jìn)行跳轉(zhuǎn)

      php判斷手機(jī)端并跳轉(zhuǎn)的實(shí)現(xiàn)方法:首先創(chuàng)建一個PHP示例文件;然后將實(shí)現(xiàn)判斷跳轉(zhuǎn)的代碼封裝成一個常用的函數(shù)“ismobile”;最后直接使用ismobile函數(shù)進(jìn)行判斷跳轉(zhuǎn)即可。

      php如何實(shí)現(xiàn)判斷手機(jī)端進(jìn)行跳轉(zhuǎn)

      推薦:《PHP視頻教程》

      PHP 網(wǎng)頁判斷手機(jī)端,自動跳轉(zhuǎn)到手機(jī)端頁面

      //新增 如果是手機(jī)訪問 則跳轉(zhuǎn)到手機(jī)端頁面         if(strpos($agent,"comFront") || strpos($agent,"iPhone") || strpos($agent,"MIDP-2.0") || strpos($agent,"Opera Mini") || strpos($agent,"UCWEB") || strpos($agent,"Android") || strpos($agent,"Windows CE") || strpos($agent,"SymbianOS"))         header("Location:http://hd2017.cn/index.php?m=mobile&a=index");

      我們可以把它封裝成一個常用的函數(shù)!

      // $murl 為手機(jī)端的頁面地址     function ismobile($murl=""){         //新增 如果是手機(jī)訪問 則跳轉(zhuǎn)到手機(jī)端頁面          if(strpos($agent,"comFront") || strpos($agent,"iPhone") || strpos($agent,"MIDP-2.0") || strpos($agent,"Opera Mini") || strpos($agent,"UCWEB") || strpos($agent,"Android") || strpos($agent,"Windows CE") || strpos($agent,"SymbianOS"))         header("Location:{$murl}");     }

      這樣在我們使用的時候就方便很多了!

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