လက်ရှိတည်နေရာ: ပင်မစာမျက်နှာ> ဖန်ရှင်အမျိုးအစားများ> bin2hex

bin2hex

Binary Data ကို hexadecimal ကိုယ်စားပြုမှုသို့ပြောင်းပါ
အမည်:bin2hex
အမျိုးအစား:ကြိုး
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:string ကို ascii ဇာတ်ကောင်များ၏ string ကို hexadecimal တန်ဖိုးများသို့ပြောင်း။

အဓိပ္ပါယ်နှင့်အသုံးပြုမှု

bin2hex() function သည် Ascii ဇာတ်ကောင်များ၏ string ကို hexadecimal တန်ဖိုးများအဖြစ်ပြောင်းလဲပေးသည်။ ကြိုး pack() function ကိုအသုံးပြုခြင်းဖြင့်ကြိုးများကိုပြန်ကူးယူနိုင်သည်။

နမူနာ

ဥပမာ 1

"Shanghai" ကို hexadecimal value သို့ပြောင်းပါ။

 <? PHP
$ str = bin2hex ( "Shanghai" ) ;
ပဲ့တင်သံ ( $ str ) ;
>

သင်ကိုယ်တိုင်စမ်းကြည့်ပါ

ဥပမာ 2

string value ကို binary မှ hexadecimal သို့ပြောင်းပြီးပြန်ပြောင်းပါ။

 <? PHP
$ str = "ရှန်ဟိုင်း" ,
echo bin2hex ( $ str ) ။ "<br> <br>" ;
ECHO Pack ( "H *" , bin2hex ( $ str ) ) ။ "<br> <br>" ;
>

သင်ကိုယ်တိုင်စမ်းကြည့်ပါ

သဒ္ဒါ

 Bin2hex ( string )
တေးရေး ဖေါ်ပြ
ကြိုး လိုအပ်ပါတယ် ပြောင်းလဲခံရဖို့ string ကို။
သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
  • သက်ဆိုင်သောအက္ခရာများအားလုံးကို HTML အဖွဲ့အစည်းများသို့ပြောင်းပါ htmlentities

    htmlentities

    သက်ဆိုင်သောအက္ခရာမျာ
  • ဒေသဆိုင်ရာသတင်းအချက်အလက် setting setlocale

    setlocale

    ဒေသဆိုင်ရာသတင်းအချက်
  • စာလုံးကြီး၏ပထမ ဦး ဆုံးအက်ခရာကိုသတ်မှတ်ပါ ucfirst

    ucfirst

    စာလုံးကြီး၏ပထမဦးဆုံး
  • output ကိုတစ်ခုသို့မဟုတ်တစ်ခုထက်ပိုသောကြိုးများ echo

    echo

    outputကိုတစ်ခုသို့မဟ
  • စုံစမ်းမှုဘာသာစကားနှင့်ဒေသဆိုင်ရာသတင်းအချက်အလက်များ nl_langinfo

    nl_langinfo

    စုံစမ်းမှုဘာသာစကားနှ
  • C startion တွင် backslashes ကို အသုံးပြု. string တစ်ခုအတွက်ဇာတ်ကောင်များလွတ်မြောက်ခြင်း addcslashes

    addcslashes

    Cstartionတွင်backsla
  • Locale Settings အပေါ်အခြေခံပြီးကြိုးများနှိုင်းယှဉ် strcoll

    strcoll

    LocaleSettingsအပေါ်အ
  • uuencode encoded string ကို decode convert_uudecode

    convert_uudecode

    uuencodeencodedstrin
လူကြိုက်များသော ဆောင်းပါးများ