W
String urlencode ( string $str
)
Returns a string in which all non-alphanumeric characters except -_ are replaced with a percent sign (%) followed by a two-digit hexadecimal number, and a space is encoded as a plus (+). This encoding is the same as the WWW form POST data, and is encoded in the same way as the application/x-www-form-urlencoded media type. For historical reasons, this encoding is encoded with a space as a plus sign (+). RFC3896 encoding (see Rawurlencode ()) is different.
String rawurlencode ( string $str
)
Returns a string that all non-alphanumeric characters except -_ in this string are replaced with a percent (%) followed by a two-digit hexadecimal number. Is this in? The encoding described in RFC 3986 is intended to protect the literal characters from being interpreted as a special URL delimiter, while protecting the URL format from being confused by the transfer of media (like some messaging systems) using character conversions.
String htmlspecialchars ( string $string
[, int $flags
= Ent_compat | ent_html401 [, string $encoding
= Ini_get ("Default_charset") [, bool $double_encode
= True]]])
Certain types of characters have special uses in HTML, and they need to be expressed as HTML entities if they are to be retained. This function returns the expression after character escapes. To convert all the associated name entities in a substring, use htmlentities () instead of this function.
If the character encoding of the passed-in character is consistent with the final document, the input processed with the function is appropriate for most HTML document environments. However, if you enter a character encoding that is not the same as the document that eventually contains the characters, you want to preserve the character (in the form of a number or name entity), this function and htmlentities () (the substring corresponding to the encoded name entity) may not be sufficient. This can be used instead of mb_encode_numericentity ().
string
htmlentities ( string
$string
[, int
$flags
= Ent_compat | ent_html401 [, string
$encoding
= Ini_get ("Default_charset") [, bool
$double_encode
= True]]])
All aspects of this function are the same as Htmlspecialchars (), except that htmlentities () converts all characters that have HTML entities.
If you want to decode (reverse operation), you can use html_entity_decode ().
string
base64_encode ( string
$data
)
Encode using the base64 pair data
.
This encoding is designed so that binary data can be transmitted through a non-pure 8-bit transport layer, such as the body of an e-mail message.
base64-encoded data takes up about 33% more space than the original data.
UrlEncode Rawurlencode Htmlspecialchars htmlentities