How to solve “call to undefined function domxml_new_doc()…”

我只是一个虾纸丫 提交于 2019-11-27 03:42:09

问题


I am trying to output xml by using domxml_new_doc.

However, I just got the call to undefined function domxml_new_doc() error. I tried google it but still not luck. Do I have to install any extension or library? Thanks for the help.

 $doc=domxml_new_doc("1.0"); //error on this line....
$node=$doc->create_element("marker");
$parnode=$doc->append_child($node);

回答1:


you can see the requirements here. Quote:

This extension makes use of the » GNOME XML library. Download and install this library. You will need at least libxml-2.4.14. To use DOM XSLT features you can use the » libxslt library and EXSLT enhancements from » http://www.exslt.org/. Download and install these libraries if you plan to use (enhanced) XSLT features. You will need at least libxslt-1.0.18.




回答2:


What PHP version are you using? You need to ensure that make sure you have the domxml library/extension.



来源:https://stackoverflow.com/questions/3006246/how-to-solve-call-to-undefined-function-domxml-new-doc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!