1.问题

   在ubuntu 16.10中,学习PHP,学习到PHP如何生成XML文件时候,碰到了这个问题:

PHP Fatal error: Class 'ClassName\SimpleXMLElement' not found in /var/www/html/.../reg.class.php on line 40;

 

2.解决

   2.1 安装php7.0-xml。

      在ubuntu中可以使用"sudo apt-get install php7.0-xml"进行安装。

   2.2 重启apache服务。

           在ubuntu中可以使用“sudo service apache2 restart”重启apache服务。

  最后问题得到解决。

 

相关文章:

  • 2021-12-06
  • 2022-12-23
  • 2021-07-15
  • 2021-11-16
  • 2021-11-23
  • 2021-07-19
  • 2021-08-29
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2022-01-27
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
相关资源
相似解决方案