utf8_(en|de)code removed from php7?(从 php7 中删除了 utf8_(en|de) 代码?)
问题描述
我最近在我的开发服务器上切换到 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_decode
和 utf8_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 以加载新包.
这篇关于从 php7 中删除了 utf8_(en|de) 代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从 php7 中删除了 utf8_(en|de) 代码?
基础教程推荐
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- HTTP 与 FTP 上传 2021-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01