// 检测字符的编码格式
        $encode = mb_detect_encoding($string, array('ASCII','UTF-8','GB2312','GBK','BIG5'));
        echo $encode;

        // 转换编码格式
        if ($encode == 'UTF-8'){
            $string = iconv('UTF-8','GBK',$string);
        }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2021-08-24
  • 2022-02-09
  • 2022-12-23
相关资源
相似解决方案