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 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面