当我在localhost中运行我的系统时,它是成功的。但当我把它放入服务器时,它会显示此错误消息..问题是什么?
Strict Standards</b>: Non-static method DOMDocument::loadXML() should not be called statically, assuming $this from incompatible context in <b>F:\htdocs\bricksmind\hafiz\dochelper.php</b> on line <b>58
以下是dochelper.php的第58行:
$Xml = DOMDocument::loadXML($Data, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);
答案 0 :(得分:0)
导致此错误的原因是您在静态时静态调用方法loadXML
。
您可以通过以下方式解决此问题:
// create a DOMDocument instance
$doc = new DOMDocument();
// call the method on the instance
$doc->loadXML($Data, LIBXML_NOENT | LIBXML_XINCLUDE | LIBXML_NOERROR | LIBXML_NOWARNING);
// then print the XML
echo $doc->saveXML();
希望这会有所帮助: - )