我的系統是Ubuntu的12.04,PHP 5.3,我試圖運行一些基本的國際代碼:PHP 5.3,似乎默認
<?php
$coll = collator_create('en_US');
$result = collator_compare($coll, "string#1", "string#2");
它輸出
PHP Fatal error: Call to undefined function collator_create()
是不是應該從5.3版本開始將PHP擴展爲Intl擴展?
PHP經apt-get
安裝使用此命令行(我不使用Apache):
apt-get install php5 php5-cli php5-mysql php5-cgi php5-fpm php5-curl php-apc php5-memcache php5-memcached php5-common php5-gd php-xml-parser php-pear php5-imap php5-mcrypt php5-xdebug php5-suhosin
這裏是什麼php -v
生產:
PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
調用'ini_get('disable_functions');'只是爲了確保它沒有被禁用? – Danack 2013-02-21 13:20:08
@Danack'ini_get('disable_functions')'輸出一個空字符串。 – 2013-02-21 13:22:36