Fatal error: Class 'NumberFormatter' not found

前端 未结 15 838
误落风尘
误落风尘 2020-12-28 13:08

I\'ve been using this exact same code for ages, and I have never had a single problem. Now all of a sudden it has stopped working.

I have read across the internet ab

相关标签:
15条回答
  • 2020-12-28 13:40

    All you need is:

    apt-get install php7.0-intl
    

    No need to change php.ini or do anything else. (Tested on PHP 7 on Ubuntu 16.04).

    The most up-voted answer here has you uncommenting a .dll which will never solve anything unless you are on a Windows server!

    0 讨论(0)
  • 2020-12-28 13:41

    This means that your intl package for PHP is not installed and/or not enabled.

    Step 1

    Make sure that you install php7.2-intl (or check that it is installed). In my case, I had PHP 7.2, but the version could change.

    To install, I used

    sudo apt install php7.2-intl
    

    Step 2

    After a successful installation, go to php.ini and enable that extension by removing the comment, as follows

    extension=intl
    

    Step 3

    Retstart apache

    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-12-28 13:41

    Change in php extensions did not work for me so I updated my php version from php 5.6.25 to 7.0.10 and it worked

    0 讨论(0)
  • 2020-12-28 13:42

    You just need to enable this extension in php.ini by uncommenting this line:

    extension=ext/php_intl.dll
    

    For more details visit, Enable intl extension

    0 讨论(0)
  • 2020-12-28 13:42

    Solutions For ALL Windows and Mac.

    Most of time this extension is not there, You just need to enable this extension in php.ini by uncommenting this line,

              extension=intl
    

    if that line doesn't exists then add that line as like below in any place below first line,

             extension=intl
             extension=ext/php_intl.dll
    

    for better result add below as like as well because with above one is in some scenario not working with only below one,

             extension=php_intl.dll
    

    Then it look like this,

             extension=ext/php_intl.dll
             extension=php_intl.dll
             extension=intl
    

    After That Mostly Don't Forgot to restart your server in my case I am using xampp otherwise the changes not working properly.

    0 讨论(0)
  • 2020-12-28 13:43

    If you are using Google App Engine, just add:

    extension = "intl.so"
    

    to your application's php.ini file.

    https://cloud.google.com/appengine/docs/php/runtime

    0 讨论(0)
提交回复
热议问题