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

strip_tags

ကြိုးမှ HTML နှင့် PHP tags များကိုဖယ်ရှားပါ
အမည်:strip_tags
အမျိုးအစား:ကြိုး
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:ကြိုးများမှ HTML နှင့် PHP tags များကို strip လုပ်ပါ။

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

strip_tags() function strips များ HTML, XML နှင့် PHP Tags များနှင့် PHP Tags များ။

မှတ်ချက် - ဤလုပ်ဆောင်ချက်သည် HTML မှတ်ချက်များကိုအမြဲတမ်း stripss ။ ၎င်းကို ခွင့်ပြု PRAMAMETATEY မှ ပြောင်းလဲ. မရပါ။

မှတ်ချက် - ဒီ function က binary ဘေးကင်းလုံခြုံသည်။

နမူနာ

ဥပမာ 1

ကြိုးများမှ HTML tags များကိုချထားပါ။

 <? PHP
ပဲ့တင်သံ strips_tags ( "ဟဲလို <ခ> ကမ္ဘာကြီးကိုကမ္ဘာ), </ b>" ) ;
>

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

ဥပမာ 2

ကြိုးမှ HTML tags များကိုချွတ်ပါ, သို့သော် <b> tags များကိုခွင့်ပြုပါ။

 <? PHP
echo strip_tags ( "ဟဲလို <B> <i> World! </ i> </ b> " <b> "" " "
>

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

သဒ္ဒါ

 strip_tags ( <
ငါ > string ကို ခွင့် ပြုပါ )
တေးရေး ဖေါ်ပြ
ကြိုး လိုအပ်ပါတယ် စစ်ဆေးခံရဖို့ string ကိုဖေါ်ပြသည်။
ခွင့်ပြု optional ကို။ ခွင့်ပြုထားသောတံဆိပ်များကိုသတ်မှတ်သည်။ ဤရွေ့ကား tags များကိုဖျက်ပစ်လိမ့်မည်မဟုတ်ပါ။
သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
  • အထူးအက္ခရာများကို HTML အဖွဲ့အစည်းများသို့ပြောင်းပါ htmlspecialchars

    htmlspecialchars

    အထူးအက္ခရာများကိုHTM
  • သက်ဆိုင်သောအက္ခရာများအားလုံးကို HTML အဖွဲ့အစည်းများသို့ပြောင်းပါ htmlentities

    htmlentities

    သက်ဆိုင်သောအက္ခရာမျာ
  • uuencode encoded string ကို decode convert_uudecode

    convert_uudecode

    uuencodeencodedstrin
  • String တွင်အသုံးပြုသောဇာတ်ကောင်များအကြောင်းသတင်းအချက်အလက်များကိုပြန်လည်ထူထောင်ခြင်း - byte တန်ဖိုးတစ်ခုစီ၏အကြိမ်အရေအတွက်ကိုရေတွက်သည်။ count_chars

    count_chars

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

    strcoll

    LocaleSettingsအပေါ်အ
  • strings များကို array သို့ပြောင်းပါ str_split

    str_split

    stringsများကိုarrayသ
  • string ကိုပေးထားသောအလွှာနှင့်အတူစတင်မရှိစစ်ဆေးပါ str_starts_with

    str_starts_with

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

    addcslashes

    Cstartionတွင်backsla
လူကြိုက်များသော ဆောင်းပါးများ