Php DOMDocument loadHTML函数失败

Php DOMDocument loadHTML函数失败,php,html,domdocument,Php,Html,Domdocument,我试图将一些html加载到DOMDocument中,但无法正确调试它 这是原始(未格式化)HTML字符串: <html><head><title>Pagina 1</title> <link rel='stylesheet' href='/css/SxCms.css' type='text/css'></head><body> <div id='editorWrapper' style='postion:

我试图将一些html加载到DOMDocument中,但无法正确调试它

这是原始(未格式化)HTML字符串:

<html><head><title>Pagina 1</title>
<link rel='stylesheet' href='/css/SxCms.css' type='text/css'></head><body>
<div id='editorWrapper' style='postion: relative; z-index: 1; width:1600 height: 1131px;'>
<img id='editingImage' src='/img/briefingStartP-Stages2013-2014.pdf/briefingstartp-stages2013-2014_1395824936_1.jpg' /></div></body></html>
output.txt中的最后一个输出是“doc created”。我应该看到一个例外,对吗

感谢您的帮助:)

编辑
使用
libxml\u use\u internal\u errors(true)
没有帮助。我仍然在输出文件中创建了文档。

是否检查了服务器上的错误日志

另外,在你的捕获中尝试,看看会发生什么:

file_put_contents('output.txt', "failed: ". print_r($ex, true));

什么是
$html
内容?很抱歉,您可能想签出保存上一个区块原始html的变量。@passerby我更新了我的问题。仍然在我的输出文件中创建了文档。@RobbieVercammen您有错误报告吗?您在PHP日志中看到任何错误吗?打印$ex没有按照您建议的方式工作。我会回到日志上。我正在远程zend服务器上工作,所以我还不能检查它。
file_put_contents('output.txt', "failed: ". print_r($ex, true));