duansha6410 2013-12-18 12:36
浏览 59
已采纳

PHP致命错误:尽管PHP 5.3.24,但找不到类'Collat​​or'

my output after code below is: "PHP Fatal error: Class 'Collator' not found".

I've read in php manual that for COLLATOR class, PHP version needs to be PHP 5 >= 5.3.0. My PHP version is 5.3.24.

in my phpinfo() I searched 'coll' string but nothing is found.

also please note that my site lang is Turkish and I am using UTF-8

So what is the reason for my fatal error output? Thanks.

/* fetch values */
$etiket_bulutu = '';
while ($beyan->fetch()) 
{
    $etiket_bulutu .=  $tags.', ';
}

$etiket_bulutu = substr_replace($etiket_bulutu ,'',-2); //omit last {, } chars

$etiketler = explode(", ", $etiket_bulutu); //get each tag as arr

$etiketler = array_unique($etiketler);
$etiketler = array_values($etiketler); //only unique tags without NULLs

$etadet = count($etiketler);

$coll = collator_create('tr_TR'); //from http://www.php.net/manual/en/collator.sort.php
collator_sort($coll, $etiketler);

for($x=0;$x<$etadet;$x++)
 {
  echo $etiketler[$x];
  echo "<br />";
 }
  • 写回答

1条回答 默认 最新

  • duanren9163 2013-12-18 12:40
    关注

    In the manual, note that the class is part of the intl extension. See the Installation Instructions for intl and note that it needs to be explicitly installed using --enable-intl and/or may require the ICU library, depending on the system. Check your PHP installation whether intl is installed or not.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败