久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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如何將漢字轉(zhuǎn)ascii

      php將漢字轉(zhuǎn)ascii的方法:首先創(chuàng)建一個php示例文件;然后通過封裝好的“public function strtoascii($str){}”方法將漢字轉(zhuǎn)為ascii即可。

      php如何將漢字轉(zhuǎn)ascii

      推薦:《PHP視頻教程》

      直接使用吧,函數(shù)就在下面,自己封裝的,親測正確無誤

      將字符串(中文同樣實用)轉(zhuǎn)為ascii(注意:我默認當前我們的php文件環(huán)境是UTF-8,如果是GBK的話mb_convert_encoding操作就不需要)

      public function strtoascii($str){         $str=mb_convert_encoding($str,'GB2312');         $change_after='';         for($i=0;$i<strlen($str);$i++){             $temp_str=dechex(ord($str[$i]));             $change_after.=$temp_str[1].$temp_str[0];         }         return strtoupper($change_after);     }

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