由于未定义的函数,PHP无法执行

时间:2016-09-03 06:52:49

标签: php apache

由于未定义的函数,PHP未执行,因为似乎在apache错误日志中,

  

PHP致命错误:调用未定义的函数simplexml_load_file()   第24行/var/www/html/index.php

这是该函数所在的PHP代码

$url = "https://www.reddit.com/r/nsfw/new/.rss";
$xml = simplexml_load_file($url);

基于phpinfo函数,我的php5.6安装启用了simplexml。它只是出现在模块列表中..

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

尝试 phpinfo()并查看是否加载了simplexml,也可以在php.ini文件中使用取消注释 extension = simplexml.so 加载它。

相关问题