Home  >  Article  >  Backend Development  >  What should I do if IIS accesses php garbled code?

What should I do if IIS accesses php garbled code?

藏色散人
藏色散人Original
2020-07-06 10:09:032329browse

IIS PHP garbled solution: First open the PHP configuration file "php.ini"; then find the statement ";default_charset = "ISO-88509-1""; finally modify it to "default_charset = "UTF-8"" will do.

What should I do if IIS accesses php garbled code?

Solution to the problem where IIS accesses the PHP webpage with garbled characters but the HTML webpage is normal:

Because PHP does not set the encoding.

To set the default encoding:

Go to the php configuration file php.ini

Search for default_charset

You will find ";default_charset = "ISO-88509- 1" ”

Change to default_charset = "UTF-8"

Note: (The semicolon in front must be removed)

For more related knowledge, please visitPHP Chinese website!

The above is the detailed content of What should I do if IIS accesses php garbled code?. For more information, please follow other related articles on the PHP Chinese website!

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