本文介绍了调用未定义的函数simplexml_load_file()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的ubuntu服务器上运行的是php 7.0.
I have php 7.0 running on my ubuntu server.
php -m命令说:
php -m command says:
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
但是当我运行我的网站时,它的日志仍然显示" PHP致命错误:调用未定义的函数simplexml_load_file()"
But still when I run my website, its log says "PHP Fatal error: Call to undefined function simplexml_load_file()"
推荐答案
我遇到了同样的问题.我通过安装php7.2-xml
来解决它:
I had the same issue. I fixed it by installing php7.2-xml
:
$ apt-get install php7.2-xml
此后,php -m
列出了SimpleXML:
After that, SimpleXML got listed by php -m
:
$ php -m | grep -i simple
SimpleXML
这篇关于调用未定义的函数simplexml_load_file()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!