Convert a binary number to Base 64

前端 未结 4 1415
陌清茗
陌清茗 2021-01-15 12:14

I know this is a pretty silly question, but I don\'t know what to do.

I have an arbitrary binary number, say,

100100000011001000000010010000001000001         


        
4条回答
  •  独厮守ぢ
    2021-01-15 13:02

    $number = 1001000000110010000000100100000010000011000000010001000001011000110000110000011100011100000011000000010010011000100000000000000100100000010110001100001000000111;
    echo base64_encode ($number);
    

    This is if you want the exact string be converted into Base 64.

提交回复
热议问题