帝国cms php乱码显示 急急~~~~~~~~~
- <?php
- ” target=”_blank” rel=”nofollow” title=”<?php echo substr($arr[‘topic’],0,36);?>”><?php echo substr($arr[‘topic’],0,36);?>
mysql_connect(‘localhost’,’hteb¥本文来源gaodai#ma#com搞@@代~&码网^搞gaodaima代码hcom’,’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’);
?>
<?php
$result=mysql_query(“select * from phome_ask_speak order by id desc limit 6”);
while($arr=mysql_fetch_array($result)){
?>
<?php } ?>
数据库编码是utf_8,页面head也有写 <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
上面这短代码还是显示乱码。 请问是什么问题??????? 求指教·····
——解决方案——————–
说明数据库里的数据的确不是Utf8的。
——解决方案——————–