utf8转gbkheader("Content-type:text/html;charset=UTF-8");echo$str='你好,这里是utf8转gbk!';echo'';echoiconv("UTF-8","gbk//TRANSLIT",$str);//将字符串的编码从UTF-8转到GB2312gbk转为utf8header("Content-type:text/html;charset=GB2312");echo$str='你好,这里是gbk转utf8!';echo'';echoiconv('GB2312','UTF-8',$str);//将字符串的编码从GB2312转到UTF-8检