php 致命错误:找不到“IntlDateFormatter”类
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6242378/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fatal error: Class 'IntlDateFormatter' not found
提问by Jalal
回答by Jalal
The extension was there! All you need to do is clearing the comment(;) before this line in php.ini
file:
扩展在那里!您需要做的就是清除php.ini
文件中这一行之前的注释(;) :
;extension=php_intl.dll
to
到
extension=php_intl.dll
回答by Bira
if you see this on Debian / other Linux platforms.
如果你在 Debian / 其他 Linux 平台上看到这个。
sudo apt-get install php5-intl
- for PHP 5.6
sudo apt-get install php5-intl
- 用于 PHP 5.6
sudo apt-get install php7.0-intl
- PHP 7+
sudo apt-get install php7.0-intl
- PHP 7+
Amazon Linux
亚马逊 Linux
sudo yum install php70-intl
sudo yum install php70-intl
After that restart Apache services.
之后重新启动Apache服务。
sudo service apache2 restart
restart apache to get the changes.
sudo service apache2 restart
重新启动 apache 以获取更改。
回答by Archana
It may be because of Apache. Restart Apache by following command
这可能是因为 Apache。通过以下命令重新启动Apache
service httpd restart
and try again.
然后再试一次。