问题
Im using wampserver on localhost with;
- PHP 5.3.13
- Apache 2.2.22
- Enabled php_intl.dll extension
But i got following error while using locale_get_default()
function
Fatal error: Call to undefined function locale_get_default() in
Or using Locale::getDefault()
function
Fatal error: Class 'Locale' not found in
回答1:
snip didnt read:
Are you sure the extension is loaded? (See phpinfo();
)
回答2:
Solved with Following Link
http://forum.wampserver.com/read.php?2,80704,116793
Ok, I got it to work. It looks like Apache can't find the icu*.dll files (in the php directory).
So, one solution is to add "C:\wamp\bin\php\php5.3.9" (or similar directory) to your system PATH.
The other solution is to copy the icu*.dll files to your apache's bin directory.
A third option is to copy the icu*.dll files to your Windows system directory (system32 or SysWOW64).
来源:https://stackoverflow.com/questions/20520026/locale-get-default-function-issue-on-localhost