久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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怎么將string(字符串)轉(zhuǎn)為二進(jìn)制

      php將string(字符串)轉(zhuǎn)為二進(jìn)制的步驟:1、使用bin2hex()函數(shù)將字符串轉(zhuǎn)為16進(jìn)制值,語法“bin2hex(string)”;2、使用base_convert()函數(shù)將16進(jìn)制值轉(zhuǎn)為二進(jìn)制值即可,語法“base_convert(十六進(jìn)制值, 16, 2)”。

      php怎么將string(字符串)轉(zhuǎn)為二進(jìn)制

      本教程操作環(huán)境:windows7系統(tǒng)、PHP8.1版、DELL G3電腦

      php將string(字符串)轉(zhuǎn)為二進(jìn)制的方法

      php將string(字符串)轉(zhuǎn)為二進(jìn)制,需要借助16進(jìn)制。

      步驟1:使用bin2hex()函數(shù)將string(字符串)轉(zhuǎn)為16進(jìn)制

      bin2hex(string) 函數(shù)把 ASCII 字符的字符串轉(zhuǎn)換為十六進(jìn)制值。

      返回值:返回要轉(zhuǎn)換字符串的十六進(jìn)制值。

      <?php $str = bin2hex("Hello!"); echo "字符串對(duì)應(yīng)的16進(jìn)制值:".$str."<br>"; ?>

      php怎么將string(字符串)轉(zhuǎn)為二進(jìn)制

      步驟2:使用base_convert()函數(shù)將16進(jìn)制值轉(zhuǎn)為二進(jìn)制值

      base_convert(要轉(zhuǎn)換的數(shù)或字符串, 原進(jìn)制, 要轉(zhuǎn)的進(jìn)制) 函數(shù),它可以在任意進(jìn)制之間進(jìn)行轉(zhuǎn)換

      只需要設(shè)置base_convert(十六進(jìn)制值, 16, 2)即可將16進(jìn)制值轉(zhuǎn)為二進(jìn)制。

      <?php header('content-type:text/html;charset=utf-8');   $str = bin2hex("Hello"); echo "字符串對(duì)應(yīng)的16進(jìn)制值:".$str."<br>"; echo "字符串對(duì)應(yīng)的2進(jìn)制值:".base_convert($str, 16, 2); ?>

      php怎么將string(字符串)轉(zhuǎn)為二進(jìn)制

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

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