
php将编码转换为UTF8
主要用于编码不统一导致出现乱码的情况,此函数会自动监测非UTF8编码转成UTF8编码。functionConverCode($str){$encode=mb_detect_encoding($str,array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'));$newstr=mb_convert_encoding($str,'UTF-8',$encode);return$new...




