PHP money_format

馋奶兔 提交于 2019-12-19 05:47:44

问题


I'm using on money_format with the first parameter being '%n' to include the dollar sign, and I have the locale set to en_US but it still doesn't include it. Why?


回答1:


From the PHP.net comment:

If money_format doesn't seem to be working properly, make sure you are defining a valid locale. For example, on Debian, 'en_US' is not a valid locale - you need 'en_US.UTF-8' or 'en_US.ISO-8559-1'.

This was frustrating me for a while. Debian has a list of valid locales at /usr/share/i18n/SUPPORTED; find yours there if it's not working properly.



来源:https://stackoverflow.com/questions/4158517/php-money-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!