Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
php -r 'setlocale(LC_ALL, "ru"); echo date("F", time()), "\n";'尽管我设置了俄语语言环境,但仍以英语打印“June”。
php -r 'setlocale(LC_ALL, "ru"); echo date("F", time()), "\n";'
为什么它不能按我的需要工作(使用俄语月份名称)?
考虑到语言环境,您将需要使用strftime而不是格式化日期。date
strftime
date