In the base64 encoding decoding when the + number in the HTML by the background Php->get reading will be automatically replaced with a space, causing garbled problems
It's not an echo display error, but an objective reality.
Reason excerpt: http://blog.csdn.net/wang0928007/article/details/7429568
The plus sign (+) is part of the BASE64 encoding, and the plus sign is considered a space in querystring. Therefore, when a string containing a BASE64 encoding is directly part of the URL, if it contains a plus sign, an error will occur when using QueryString to read, and then use BASE64 decoding. There are two solutions: one is to use the BASE64 string as part of the URL, encode using a function of the UrlEncode class, and then, after receiving the BASE64 string, use ReplaceAll to replace the space in the string with the Chengga number and then decode it. "
// solve the problem of changing the base64 into a space during transcoding $key Str_replace (', ' + ',$this->input->get (' key ')); $key Base64_decode ($key);
The procedure uses the direct substitution, but cannot avoid the other symbol to appear the error, at present appears only the + number will be wrong? Pending troubleshooting
PHP learning Base64_encode + # variable Space