调用未定义的函数 Symfony\Polyfill\Mbstring\iconv_strlen() [英] Call to undefined function Symfony\Polyfill\Mbstring\iconv_strlen()

查看:40
本文介绍了调用未定义的函数 Symfony\Polyfill\Mbstring\iconv_strlen()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目在本地主机上运行良好,但不能在线运行,这是错误:

My project works fine on localhost but not working online and this is the error:

Fatal error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strlen() in /home/stram/public_html/vendor/symfony/polyfill-mbstring/Mbstring.php on line 338

我用谷歌搜索了一下,发现我需要安装 PHP 扩展 iconv.我使用的是 VPS 的问题,当我转到可用的 PHP 扩展列表时,我没有找到这个扩展!



I googled it and I found that I need to install the PHP extension iconv. The problem that I'm using a VPS and when I went to the list of available PHP extensions I didn't found this extension !



提前谢谢.

推荐答案

Symfony 为这种情况提供了 iconv-polyfill.只需将其作为需求添加到您的项目中,您应该没问题:

Symfony provides an iconv-polyfill for cases like that. Just add it as requirement to your project, and you should be fine:

composer require symfony/polyfill-iconv

这篇关于调用未定义的函数 Symfony\Polyfill\Mbstring\iconv_strlen()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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