前言
- CentOS7
- php 8.1.27
- CentOS7 利用remi yum源安装php8.1
php运行报错: Class ‘SimpleXMLElement’ not found in
[12-Mar-2024 05:47:29 UTC] PHP Warning:Undefined array key "token" in /data/www/a.php on line 3[12-Mar-2024 05:47:29 UTC] PHP Fatal error:Uncaught Error: Class "SimpleXMLElement" not found in /data/www/a.php:46Stack trace:#0 /data/www/a.php(26): _get_weixin_request_info()#1 {main}thrown in /data/www/a.php on line 46
问题原因
缺少 php-xml
解决办法
- 安装php-xml
shell> yum install php81-php-xml
- 重启php-fpm服务
shell> systemctl restart php81-php-fpm