1
我正在为PHP domdocument
错误在运行时说PHP错位的DocType警告
error: "DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Misplaced DOCTYPE declaration in Entity, DOMDocument::loadHTML()
line: 1 DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: htmlParseStartTag: misplaced <html> tag in Entity, line2:
我的代码
$doc = new DOMDocument();
@$doc->loadHTML($htmlString);
我的HTML字符串可能会有所不同。
我不知道如何解决这个问题。任何人都可以提出解决方案非常感谢!