Home >Backend Development >PHP Tutorial >Strange problem PHP output is blank_PHP tutorial

Strange problem PHP output is blank_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:30:401085browse

Today I downloaded a code from the Internet and came back to debug it. At first, it reported an error in the code. After some debugging, there was finally no problem with the code.

But the IE display is blank. When I check the source code of the web page, everything is output, but IE is blank. I feel dizzy.

I looked over it again and asked my colleagues for advice, and there was no problem with the code.

Inadvertently, when I saved the file as, I found that the file was UTF-8 encoded, and I finally discovered the problem.

The code defines:

But the file is encoded as UTF-8, which causes display errors.

Change the file encoding to ANSI, refresh the page, and the long-awaited thing is finally displayed.

Summary: If the charset defined in the file header does not match the encoding of the file itself, the page output may be blank.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509157.htmlTechArticleI downloaded a code from the Internet today and came back to debug it. At first, it reported an error in the code. After debugging, the code finally disappeared. Problem. However, the IE display is blank. Check the source code of the web page,...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn