php字符串转码、编码转换

utf8转换为gbk

iconv(“UTF-8″,”gbk//TRANSLIT”,$str); //将字符串的编码从UTF-8转到GB2312

gbk转换为utf8

iconv(‘GB2312’, ‘UTF-8’, $str); //将字符串的编码从GB2312转到UTF-8

[……]

继续阅读