Escape functions in PHP

Source: Internet
Author: User

<?PHPParse_urlParse the URL,return to each componentUrlEncode/UrlDecodeURL encoding/decodinghtmlentitiesConvert A string to an HTML entityhtmlentities($str,$key)    $key:Ent_compat Convert double quotes only, default ent_quotes convert single double quotes ent_noquotes do not convert any symbolsHtmlspecialchars($str,$key) HTML entity conversion, similar to Htmlentities,parameters are the same as Htmlentities Htmlspecialchars_decode HTML entities to HTML codeaddslashes() Add a backslash before a predefined stringGET_MAGIC_QUOTES_GPC() Get PHP.INI in MAGIC_QUOTES_GPC, return bool typestripslashesRemove the backslash before the escape string, as opposed to addslashes

Strip_tags ($str) Remove the tags from HTML xml php
Strip_tags ($str, $tags), optionally the second parameter is the label to keep

Escape functions in PHP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.