1
我有PHP代码不工作了PHP漂亮的打印停止工作
$doc = DOMDocument::loadXML($string);
$doc->formatOutput = true;
echo $doc->saveXML();
我有错误
Fatal error: Call to undefined method stdClass::saveXML() in /path/to/the/File on line 242
我有PHP版本5.2.14
那么我们学到了什么?开发时打开错误报告! :) – 2011-05-21 09:40:17
$字符串不是空的,但'loadXML'返回'FALSE' – jcubic 2011-05-21 09:51:26
@jcubic做'libxml_get_errors()'产生任何东西? http://php.net/manual/en/function.libxml-get-errors.php – 2011-05-21 09:53:46