Home >Operation and Maintenance >CentOS >How to solve the problem of Chinese garbled characters in php under centos

How to solve the problem of Chinese garbled characters in php under centos

WJ
WJOriginal
2020-06-02 16:18:561988browse

How to solve the problem of Chinese garbled characters in php under centos

How to solve the problem of garbled Chinese characters in php under centos?

The php webpage outputs garbled characters under ubuntu, without involving database encoding:

Modify"/etc/php5/apache2/php.ini"Change

default_charset = "iso-8859-1"

to

default_charset = "utf-8"

and then restart apache:

sudo /etc/init.d/apache2 restart

Related reference: centOS tutorial

The above is the detailed content of How to solve the problem of Chinese garbled characters in php under centos. 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