PHP报错Call to undefined function utf8_decode()的解决方案

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21891743/article/details/88970401

出现这个这个情况,一般是缺少了php-xml扩展

  • 首先查看PHP版本php -v
    在这里插入图片描述
  • 例如上面的版本是7.0,然后执行sudo apt-get install php7.0-xml 安装对应的扩展。然后重启服务。
  • 备注,如果出现了E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?类似的情况,可以尝试sudo apt-get update后再操作。

猜你喜欢

转载自blog.csdn.net/qq_21891743/article/details/88970401