Name of function |
Use |
Note |
Htmlspecialchars |
will be with &&, single and double quotes ' ", Greater than >, less than < turns into HTML format |
&&->& '->& #039 "->" <->< >->> |
Htmlentities |
Turn all characters into HTML format |
Except with &&, single and double quotes '/', Greater than >, less than <, and also includes double-byte character display as encoding, etc. |
Addslashes |
Place single double quote ' ", backslash backslash\, NULL Plus backslash \ Escape |
\‘ \" \\ \null |
Stripslashes |
Remove backslash characters |
Remove the backslash character in the string, if two consecutive, Then remove a |
Quotemeta |
Add Reference symbol |
The string that contains the. \\ + * ? [ ^ ] ($) and other characters. preceded by a backslash \ Symbol |
Nl2br |
Turn line break \ n to <br> |
<br> for HTML format |
Strip_tags |
Remove HTML and PHP tags |
Remove any HTML and PHP tags from the string, including tags Content, note that if there are errors in the string HTML and PHP tags, it will also return error |
Mysql_real_escape_string |
Escaping special characters in SQL strings |
Escape \x00 \ r \ n space \ ' "\x1a, which is useful for multibyte character processing, which determines the character set, mysql_escape_string does not consider |
Base64_decode |
Base64 decoding |
Decoding data that uses MIME base64 encoding |
Base64_encode |
Base64 encoding |
Encode data using MIME base64 |
Rawurldecode |
URL decoding |
Decoding an encoded URL string |
Rawurlencode |
URL encoding |
Encode URLs according to RFC 1738 |
UrlDecode |
URL decoding |
Decodes an encoded URL string |
UrlEncode |
URL encoding |
Encoded URL string |
(Filter and Escape) PHP comes with filter and escape functions