Php page loading garbled code, how to solve

Source: Internet
Author: User
Php page loading garbled & lt; meta & nbsp; http-equiv = "Content-Type" & nbsp; content = "text/html; charset = UTF-8" & nbsp; /& gt; The header is written as above, and the file is saved as UTF-8. why is the page still garbled during page loading? However, the php page is garbled during loading.


The header is written as above, and the file is saved as UTF-8. why is it still garbled when loading the page?

But clicking a link button on the page won't be messy. what's the problem?
------ Solution --------------------
Clear the browser cache and test again
------ Solution --------------------
Suspect that your file is not UTF-8 encoded
------ Solution --------------------
Are all garbled characters or some garbled characters?
------ Solution --------------------
Reference:
I am running the page. right-click the page and check the source code. it's UTF-8.



The reference was wrong!
We cannot see that the file storage method is UTF-8 encoded. you should use the software.
------ Solution --------------------
Reference:
I am running the page. right-click the page and check the source code. it's UTF-8.

When saving the file, select save as, and then select the encoding to overwrite the original file.
------ Solution --------------------
If data is removed from the database, ensure that the character set of the database is correct and set the read character set after the database is connected.
------ Solution --------------------
Is it UTF-8?
------ Solution --------------------
Reference:
No data read from the database
I saved the view file to UTF-8 one by one.

Now, the disgusting problem is that I open a page without chaos, and then open the same page with chaos, and the garbled and non-garbled alternate appearance.

Feeling the first situation
If the gzip and zlib compression technologies are enabled at the same time, garbled characters are displayed. the solution is to disable one of them.

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.