帝国CMS php显示乱码 求指教--------
mysql_connect('localhost','htebhcom','r5w8f8') or die('database server no exists!');
mysql_select_db('htebhcom')or die('database error!');
mysql_query("set names utf-8");
mysql_query("SET CHARACTER_SET_CLIENT=utf-8"); //服务器设置客户端编码
mysql_query("SET CHARACTER_SET_RESULTS=utf-8");//设置查询结果的编码
ini_set("display_errors", "off");
date_default_timezone_set('PRC');
?>
$result=mysql_query("select * from phome_ask_speak order by id desc limit 6");
while($arr=mysql_fetch_array($result)){
?>
数据库编码是utf_8,页面head也有写
上面这短代码还是显示乱码。 请问是什么问题??????? 求指教·····
------解决方案--------------------
mysql_query("set names utf8");
另外,确认你的文件也是utf-8编码
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