How to solve ThinkPHP garbled code? -Php Tutorial

Source: Internet
Author: User
How to solve ThinkPHP garbled code ?? ---- "$ This-& gt; error (& quot; the image cannot be blank! & Quot;); or $ this-& gt; success (& quot; added successfully & quot ;); when they are executed, the prompt message on the prompt page is garbled. how can this problem be solved ?? & Nbsp; some of my configuration information or other information is like this: --- database font settings: UTF-8; --- Current page ThinkPHP garbled how to solve ??
---- "$ This-> error (" the image cannot be blank! "); Or $ this-> success (" added successfully ");
When they are executed, the prompt message on the prompt page is garbled. how can this problem be solved ??

Some of my configuration information or other information is as follows:
--- Database font settings: UTF-8;
--- Font settings for the current page (Action): UTF-8;
--- Font settings for the current static page (e.g. success.html): UTF-8;
--- In the Convention configuration file: 'Template _ charset' => 'utf-8', // TEMPLATE encoding
'Output _ charset' => 'utf-8', // Default OUTPUT encoding

Why are there garbled characters? I really don't understand !!!




------ Solution --------------------
Check whether the file contains a bom header.
------ Solution --------------------
File encoding ....

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.