时间:2021-07-01 10:21:17 帮助过:7人阅读
$typeName = $_GET['typeName']; $encode = mb_detect_encoding($typeName,'CP936,UTF-8') ; //如果是CP936,就是gbk编码,如果是UTF-8, 就是utf-8编码 if ($encode =='UTF-8') { //再调用转换成utf-8编码的函数,最终确保是utf-8 $typeName = iconv("utf-8","gb2312",$typeName); }
以上就介绍了php参数乱码解决,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。