Home >Operation and Maintenance >CentOS >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!