如何解决“调用未定义的函数 domxml_new_doc()....”

发布于 2024-09-05 03:06:50 字数 283 浏览 4 评论 0原文

我正在尝试使用 domxml_new_doc 输出 xml。

但是,我刚刚收到调用未定义函数 domxml_new_doc() 错误。 我尝试用谷歌搜索但仍然不走运。我是否必须安装任何扩展或 图书馆?感谢您的帮助。

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

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);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

宁愿没拥抱 2024-09-12 03:06:50

您使用什么 PHP 版本?您需要确保拥有 domxml 库/扩展。

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

能怎样 2024-09-12 03:06:50

您可以在此处查看要求。引用:

此扩展使用 » GNOME XML 库。下载并安装该库。您至少需要 libxml-2.4.14。要使用 DOM XSLT 功能,您可以使用 » libxslt 库和 EXSLT 增强功能,来自 » http://www.exslt.org/ 。如果您计划使用(增强的)XSLT 功能,请下载并安装这些库。您至少需要 libxslt-1.0.18。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文