简体   繁体   中英

How to enable php intl

I'm on Ubuntu 17.10 PHP Version: 7.1

I already tried this:

sudo apt-get install php7.1-intl
sudo service apache2 restart

But when I var_dump extension_loaded('intl') it returns false. How can I enable this mod?

First you check the php.ini file location. For that use a php file and write:

phpinfo(); 

Then load this file in browser. You can see which config file php is using.

加载的配置文件路径

In the php.ini find this line:

;extension=php_intl.dll

and change to

extension=php_intl.dll

Restart your apache

sudo service apache2 restart

on the console enter:

sudo phpenmod intl

and the restart the apache webserver:

sudo service apache2 restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM