致命错误:找不到类“数字格式化程序”
2022-08-30 08:57:16
多年来,我一直在使用这个完全相同的代码,我从来没有遇到过一个问题。现在突然间,它已经停止工作了。
我已经在互联网上阅读了有关此问题的信息,显然您需要安装并安装插件。我同时拥有这两个功能,但每当我使用以下函数时,我仍然收到错误:PHP 5.3 or higher
PHP intl
Fatal error: Class 'NumberFormatter' not found
function format_item($value)
{
$format = new \NumberFormatter('en_US', \NumberFormatter::CURRENCY);
return $format->formatCurrency($value, 'AUD');
}
另外,这是我文件中的截图,显示我已安装插件:php.ini
PHP intl
[intl]
intl.default_locale = fr_FR
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
intl.error_level = E_WARNING
我也有 在我的 ,它也在我的目录中。extension=php_intl.dll
php.ini
为什么我会收到此错误?