【发布时间】:2017-01-15 20:25:54
【问题描述】:
我正在尝试通过 php 获取当前、下个月和下个月的下个月。
这是我当前的 php:
setlocale(LC_TIME, "de_DE.utf8");
$thismonth = strftime("%B");
$nextmonth = strftime( '%B', strtotime( '+1 month', mktime( 0, 0, 0, $month, 1, $year ) ) );
$overnextmonth = strftime( '%B', strtotime( '+2 month', mktime( 0, 0, 0, $month, 1, $year ) ) );
月份名称应该是德语所以我使用setlocale(LC_TIME, "de_DE.utf8");。
输出为:Januar(一月)、Januar(一月)、Februar(二月)。我无法解决这个问题。
【问题讨论】:
-
注意:未定义变量:月份在......
-
$month和$year来自哪里