utf8_(en | de)code已从php7中删除? [英] utf8_(en|de)code removed from php7?

查看:61
本文介绍了utf8_(en | de)code已从php7中删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在开发服务器上改用了PHP 7,到目前为止运行良好-

I recently switched to PHP 7 on my development server, which has worked just fine - until now.

自从我更新到PHP 7.0.3-10+deb.sury.org~trusty+1(今天早些时候)以来,不再可以访问utf8_decodeutf8_encode函数.但是,它们在PHP7的早期版本中.调用时,将引发致命错误.

Since I updated to PHP 7.0.3-10+deb.sury.org~trusty+1 (earlier today), the utf8_decode and utf8_encode functions are no longer accessible. They were, however, in previous versions of PHP7. When called, a fatal error is raised.

我了解到这些功能是由mbstring扩展名提供的,我用var_dump(extension_loaded('mbstring'));检查了该扩展名.

I read that these functions are provided by the mbstring extension, which I checked with var_dump(extension_loaded('mbstring')); is loaded.

如何使以上功能再次起作用?

How can I get the above functions to work again?

推荐答案

我遇到了同样的问题.只需安装php7.0-xml软件包. Ubuntu 16.04:

I had the same problem. Just install php7.0-xml package. Ubuntu 16.04:

sudo apt-get install php7.0-xml

重新启动apache2 以加载新软件包.

这篇关于utf8_(en | de)code已从php7中删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆