而AJAX支持UTF8
好了,先在PHP页上加个header("content-type:text/html; charset=utf-8″);
告诉网页这个实现的编码是UTF-8
然后把要输出的内容用$test = iconv('gbk', 'utf-8′, $test);转一下编码
然后在输出
大家有兴趣可以看看
<?php
header("content-type:text/html; charset=utf-8″);
$test="我是中文";
echo $test;
$test = iconv('gbk', 'utf-8′,$ test);
echo $test;
?>
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8