PHP Base64_decode and Base64_encode
Base64_decode
(PHP 4, PHP 5)
Base64_decode-BASE64 encoded mime of decoded data
Describe
String Base64_decode (String $ data [, Boolean $ strict = false])
Decodes a BASE64 encoded data.
Parameters
Data
Encoded data.
Strict
Returns False if the input contains a Base64 alphabet other than the character.
return value
Failed to return raw data or false. The returned data may be binary.
Modify
Release Notes
5.2.0 a strict supplement
Instance
Example # 1 Base64_decode () example
$str = ' vghpcybpcybhbiblbmnvzgvkihn0cmluzw== ';
echo Base64_decode ($STR);
?>
The above example would output:
This is an encoded string
Base64_encode
(PHP 4, PHP 5)
Base64_encode-Base64 with MIME-encoded data
Describe
String Base64_encode (string $ data)
Encode specific data for Base64.
This encoding is intended to enable binary data to survive transport through the transport layer and does not support 8-bit encoding, such as an e-mail organization.
The data that is BASE64 encoded takes approximately 33 more space than the original data.
Parameters
Data
This data is encoded.
return value
Encodes the data as a string.
Instance
Example # 1 Base64_encode () example
$str = ' This was an encoded string ';
echo Base64_encode ($STR);
?>
The above example would output:
vghpcybpcybhbiblbmnvzgvkihn0cmluzw==
http://www.bkjia.com/PHPjc/445458.html www.bkjia.com true http://www.bkjia.com/PHPjc/445458.html techarticle php Base64_decode with Base64_encode base64_decode (PHP 4, PHP 5) Base64_decode-the MIME description string that decodes the BASE64 encoding of the data Base64_decode (String $ data [, cloth ...