当前位置:Gxlcms > html代码 > 解决phpQuery(DOMDocument)解析部分HTML会产生乱码的问题_html/css_WEB-ITnose

解决phpQuery(DOMDocument)解析部分HTML会产生乱码的问题_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:67人阅读

可能是由于头部一些空白非法字符或者无法正常解析其他原因导致不能正常识别解析

解决办法:

在载入文当前拼凑

DOM:$dom = new DOMDocument(); $dom->loadHTML(''.$html);phpQuery:phpQuery::newDocument(''.$html)

人气教程排行