编程语言
首页 > 编程语言> > 找不到类规范化器(在PHP 5.3.8中)

找不到类规范化器(在PHP 5.3.8中)

作者:互联网

尝试使用Normalizer类,特别是Normalizer :: normalize函数时,我收到此PHP错误:

Fatal error: Class 'Normalizer' not found.

我当前使用的是PHP 5.3.8,因此根据PHP documentation,默认情况下应将其激活.我唯一能想到的就是PECL intl扩展存在问题.

我检查了php / ext /文件夹,那里是php_intl.dll.我检查了php.ini文件,没有extension = php_intl.dll命令,因此我添加了它.但是仍然没有运气.除此之外,我不知道.有人可以告诉我这到底是怎么回事吗?

谢谢

附加信息:当我运行phpinfo时,没有提及PECL intl扩展,因此我猜测它的安装不正确.

什么解决了我的问题:

http://www.tiv.net/2010/12/php-intl-extension-windows-apache.html,卸载XAMPP 1.77(带有PECL intl扩展名的某种内部错误)并安装XAMPP 1.73.

解决方法:

引用http://pecl.php.net/package/intl

The Internationalization extension exposes functionality of the ICU
library to PHP.

All the binaries depend on the ICU libraries (version 4.8), which
must be available to PHP.

只需使用php.exe所在的文件夹中的ICU库下载并解压缩zip的内容即可使用

ps:可以从同一位置下载php_intl.dll(在说明中显示“ Windows二进制文件”的位置:)

标签:intl,pecl,php
来源: https://codeday.me/bug/20191101/1987053.html