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.
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!