PHP 7 simpleXML
我正在测试PHP7,在最近的更新后遇到了一个奇怪的问题。默认情况下,SimpleXML 应该处于启用状态,并且我的页面显示它可用:phpinfo
但是,这些功能不可用:
<?php
if (function_exists('simplexml_load_file')) {
echo "simpleXML functions are available.<br />\n";
} else {
echo "simpleXML functions are not available.<br />\n";
}
// result-- NOT available
并且该模块未列为已加载:
~ $ php -m
[PHP Modules]
calendar
Core
ctype
curl
...
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
有谁知道是否有解决此问题的方法?
版本信息:
~ $ php -v
PHP 7.0.3-8+deb.sury.org~trusty+2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies