php get中文乱码的解决办法:1、通过“iconv("gb2312","utf-8",$str);”方法解决乱码;2、使用“mb_convert_encoding($str, "utf-8", "gb2312");”方法解决乱码。
PHP接收GET中文参数乱码的原因及解决方案
方案1:
$str = iconv("gb2312","utf-8",$str);方案2:
mb_convert_encoding($str, "utf-8", "gb2312");
下一篇:php实现网址跳转的方法