1 2 3 4 5 6 7 8 9 10 11 |
$now = strtotime(date('Y-m-d H:i:s')); $mainteStart = strtotime("2014-4-2 09:00:00"); $mainteEnd = strtotime("2014-4-2 18:00:00"); if($now<$mainteStart){ $reserveLink="https://aaaaa"; }elseif($now<$mainteEnd){ $reserveLink="http://bbbbbb"; }else{ $reserveLink="http://ccccccc"; } |
$now = strtotime(date('Y-m-d H:i:s')); $mainteStart = strtotime("2014-4-2 09:00:00"); $mainteEnd = strtotime("2014-4-2 18:00:00"); if($now<$mainteStart){ $reserveLink="https://aaaaa"; }elseif($now<$mainteEnd){ $reserveLink="http://bbbbbb"; }else{ $reserveLink="http://ccccccc"; }