Enabling domxml in php

2019-07-23 11:22发布

I have installed xampp 1.7.3 and the php version is PHP 5.3.1.When iam using the function domxml_open_file() ,it throwing an error Call to undefined function domxml_open_file().

How i can enable DOM in php.Thanks in advance.

I canot find 'extension=php_domxml.dll' in php.ini file, so i added extension=php_domxml.dll this in php.ini file

标签: php dom
2条回答
smile是对你的礼貌
2楼-- · 2019-07-23 11:59

check phpinfo() if php was compiled with --with-libxml-dir

查看更多
对你真心纯属浪费
3楼-- · 2019-07-23 12:02

DOMXML is the old PHP4 XML extension and no longer bundled with PHP5. You have to get it from PECL:

This » PECL extension is not bundled with PHP. Information for installing this PECL extension may be found in the manual chapter titled Installation of PECL extensions. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: » http://pecl.php.net/package/domxml.

Note that A DLL for this PECL extension is currently unavailable.

PHP5 features a new DOM extension, which (among others) should be available out of the box:

$dom = new DOMDocument;

Have a look at some of my previous answers involving DOM usage and also see this article on DevZone for an overview of the available XML extensions in PHP5.

查看更多
登录 后发表回答