Solution to decoding garbled characters after PHPbase64 encoding

Source: Internet
Author: User
This article mainly introduces the solution to decoding garbled text after PHPbase64 encoding. The cause of garbled text is that base64 encoding contains some special characters, so you can simply replace it with it, A friend who needs it can refer to a problem found when using PHP to do things. it can be simply attributed to a garbled problem, but this problem is not caused by the function itself. To see who is the culprit.

Suspect: base64_encode and base64_decode

Crime: I wrote a jump and prompt function. after receiving the prompt, I jumped to the specified page, but the Chinese characters are garbled during the jump prompt.

The jump template code is as follows:

The code is as follows:



Jump prompt




<? Php if ($ _ GET ['success']) {?>
:) Congratulations!

<? Php echo base64_decode ($ _ GET ['message']);?>


<? Php} else {?>
:( Error!

<? Php echo base64_decode ($ _ GET ['message']);?>


<? Php }?>


The system will<? Php echo $ _ GET ['Time'];?>Jump back. you can click here to jump directly.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.