解决linux下php中文显示乱码问题 Ubuntu+Xampp写php出现了中文乱码问题。sudo gedit /opt/lampp/etc/httpd.conf在httpd.conf中加下面这一行:AddDefaultCharset UTF8然后重新启动lampp就能正常显示中文了。