1.解决xml_parse(): input conversion failed due to input error

错误原因:xml中存在无法转换的字符;
解决:
步骤1、通过mb_detect_encoding函数,获取xml的编码;
步骤2、通过mb_convert_encoding函数转成指定的编码,或使用iconv,但编码参数需加上//IGNORE
步骤3:通过正则将<?xml …. encoding=”gb2312″ ..?>中的gb2312替换为指定编码;

相关文章:

  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-28
  • 2021-05-12
  • 2022-12-23
  • 2021-11-13
  • 2021-08-10
相关资源
相似解决方案