安装

此扩展默认为启用,编译时可通过下列选项禁用: --disable-dom

User Contributed Notes

atom_box at example dot com 23-Apr-2021 04:48
This dom extension was *not* enabled by default on Ubuntu 20.

Composer had thrown this during phpunit installation: `must enable php dom extension`.

That problem went away once I ran `sudo apt-get install php-xml`. Now everything is fine; phpunit installed fine.
smleimberg at NOSPAM dot gmail dot com 26-Dec-2017 10:08
For Ubuntu:
sudo apt-get install php7.0-xml

For Fedora:
yum -y install php-xml
PHP8中文手册 站长在线 整理 版权归PHP文档组所有