我已经安装了php56-intl使用Homebrew:brew install php56-intl
当我这样做php -m | grep intl时给了我intl
但是当我签入我的phpinfo()文件时,却没有显示出来intl.
不知道我错过了什么.
更新
所有我想安装intl在我的电脑上,以便我可以运行我的zend应用程序.但无论我做什么,我都做不到.
发生错误执行期间发生错误; 请稍后再试.
附加信息:
Zend\I18n\Exception\ExtensionNotLoadedException文件:
/Applications/XAMPP/xamppfiles/htdocs/skeleton/vendor/zendframework/zend-i18n/src/Filter/AbstractLocale.php:24信息:
Zend\I18n\Filter组件需要intl PHP扩展
问题是,intl安装在我的mac中但不安装在XAMPP中.
好吧,经过长时间的麻烦,我成功了:
去你的终端吧
cd /Applications/XAMPP/bin
然后php -m | grep intl,如果它返回intl,则安装它.如果没有安装,那么应该返回empty.
现在, sudo ./pecl install intl
会问specify where ICU libraries and headers can be found,只需按回车键,
这将安装intl,也将返回此消息You should add "extension=intl.so" to php.ini.
所以只需将其添加到您的php.ini文件并重新启动您的apache:sudo apachectl restart或者从XAMPP本身重新启动.
希望这有助于其他人.