一小段PHP代码求解
PHP code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->
<?php $eurl = mb_convert_encoding("一",'utf8','gb2312');
echo $eurl;
?>
Copier après la connexion
目的就是把中文转换成utf8编码,怎么试了试不行呢
------解决方案--------------------
iconv第三个参数是字符串。而你传了数组。$s = iconv('gbk', 'utf-8', $s['old_text']);
------解决方案--------------------
$s = mysql_fetch_array($query);
$s = iconv('gbk', 'utf-8', $s['old_text']);
另外请确认你从数据库读出的内容是 gbk 编码的