Phpbase64_decode and base64_encode. Phpbase64_decode and base64_encodebase64_decode (in PHP4, PHP5) base64_decode-the Base64 encoded MIME description string base64_decode (string $ Data [, deploy php base64_decode and base64_encode
Base64_decode
(PHP 4 and PHP 5)
Base64_decode-base64-encoded MIME of the decoded data
Description
String base64_decode (string $ Data [, Boolean $ strict = false])
Decodes BASE64 encoded data.
Parameters
Data
Encoding data.
Strict
Returns FALSE if the input contains a base64 alphabet other than the characters.
Return value
An error occurred while returning the original data or FALSE. The returned data may be binary.
Modify
Version description
Strictly supplemented by 5.2.0
Instance
Example of #1 base64_decode ()
$ Str = 'vghpcybpcybhbiblbmnvzgvkihn0cmluzw = ';
Echo base64_decode ($ str );
?>
The above example will output:
This is an encoded string
Base64_encode
(PHP 4 and PHP 5)
Base64_encode-use MIME-encoded data for Base64
Description
String base64_encode (string $ data)
Encode specific data with Base64.
This encoding is used to make binary data survive and transport through the transport layer does not support 8-bit encoding, such as email organizations.
Base64 encoding requires more than 33% of the space than the original data.
Parameters
Data
The data is encoded.
Return value
Encode the data as a string.
Instance
Example of #1 base64_encode ()
$ Str = 'This is an encoded string ';
Echo base64_encode ($ str );
?>
The above example will output:
VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw =
Http://www.bkjia.com/PHPjc/445458.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445458.htmlTechArticlephp base64_decode with base64_encode base64_decode (PHP 4, PHP 5) base64_decode-decodes the Base64 encoded MIME description string base64_decode (string $ Data [, cloth...