无法使用 Zend\I18n\View\Helper\CurrencyFormat 类 [英] Unable to use Zend\I18n\View\Helper\CurrencyFormat class

查看:22
本文介绍了无法使用 Zend\I18n\View\Helper\CurrencyFormat 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现 CurrencyFormat Helper,但是当我实例化 CurrencyFormat 的对象时,应用程序引发了异常:

I'm trying to implement the CurrencyFormat Helper, but when I instance and object of CurrencyFormat the application is raising an exeption:

$var new CurrencyFormat();

File:
/site/vendor/zendframework/zend-i18n/Zend/I18n/View/Helper/CurrencyFormat.php                    :63
Message:
Zend\I18n\View\Helper component requires the intl PHP extension

在我的控制器中,我包含了库

In my controller I'm including the library

use Zend\I18n\View\Helper\CurrencyFormat;

我想我需要在 composer.json 或配置文件中添加一些东西?

I guess I need to add something in composer.json or config files?

谢谢!

推荐答案

错误很明显.该组件需要 intl PHP 扩展.这是(通常)与 PHP 捆绑在一起的东西,需要在您的服务器上启用.

The error is pretty clear. The component requires the intl PHP extension. This is something that is (usually) bundled with PHP and needs to be enabled on your server.

这篇关于无法使用 Zend\I18n\View\Helper\CurrencyFormat 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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