一周中的几天 - 周六出错

时间:2015-09-11 04:53:24

标签: php date datetime strtotime

<? 
    date_default_timezone_set('Europe/Bucharest');
    $day = date('w');
$week_monday = date('d-m-Y', strtotime('+'.(1-$day).' days'));
$week_tuesday = date('d-m-Y', strtotime('+'.(2-$day).' days'));
$week_wednesday = date('d-m-Y', strtotime('+'.(3-$day).' days'));
$week_thursday = date('d-m-Y', strtotime('+'.(4-$day).' days'));
$week_friday = date('d-m-Y', strtotime('+'.(5-$day).' days'));
$week_saturday = date('d-M-y', strtotime('+'.(6-$day).' days'));

代码正常但我希望date中的$week_saturdaydate('d-m-Y'而不是date('d-M-y'。如果我在$week_saturday上放置相同内容,则页面不会加载。任何人都知道发生了什么?非常感谢你。最好的问候,波格丹。

0 个答案:

没有答案