Home >Backend Development >PHP Tutorial >Strange problem PHP output is blank_PHP tutorial
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.