PHP icov转码报错解决方法,iconv(): Detected an illegal character in input string

iconv(): Detected an illegal character in input string 错误解决方法

//转码
function iconv_gbk_to_uft8($string){

    $encode = mb_detect_encoding($string,array("ASCII",'UTF-8',"GB2312","GBK",'BIG5')); //获取字符串的编码

    return iconv($encode, "UTF-8",$string);
}

猜你喜欢

转载自www.cnblogs.com/aeiou/p/9341692.html
今日推荐