What should I do if IIS accesses php garbled code?

藏色散人
Release: 2023-03-01 22:54:02
Original
2289 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!