代码如下:
上一年 | 上一月 | 回到今天 | 下一月 | 下一年 | ||||||||||
{$year}年{$month}月 | ||||||||||||||
HTML; $currentDay = date ( 'Y-m-j' ); //当月最后一天 $lastday = date ( 'j', mktime ( 0, 0, 0, $nextMonth, 0, $year ) ); //循环输出天数 $day = 1; $line = ''; while ( $day { $cday = $year . '-' . $month . '-' . $day; //当前星期几 $nowWeek = date ( 'N', mktime ( 0, 0, 0, $month, $day, $year ) ); if ($day == 1) { $line = ''; $line .= str_repeat ( '', $nowWeek - 1 ); } if ($cday == $currentDay) { $style = 'style="color:red;"'; } else { $style = ''; } $line .= ""; //一周结束 if ($nowWeek == 7) { $line .= ''; $html .= $line; $line = ''; } //全月结束 if ($day == $lastday) { if ($nowWeek != 7) { $line .= str_repeat ( '', 7 - $nowWeek ); } $line .= ''; $html .= $line; break; } $day ++; } $html .=
|
/**
*
* 检测是否是32位机
* @author fc_lamp
* @blog: fc-lamp.blog.163.com
*/
function is32()
{
$is32 = False;
if (strtotime ( '2039-10-10' ) === False)
{
$is32 = True;
}
return $is32;
}