关于时间戳的获取

获取这个星期周一到周日的时间戳

$timestr = time();

$now_day = date('w',$timestr);

$sunday_str = $timestr - $now_day*60*60*24;//周一的时间戳

$strday_str = $timestr + (6-$now_day)*60*60*24;//周末的时间戳
--------------------------------
获取本月的开始到结束的时间戳

$beginThismonth=mktime(0,0,0,date('m'),1,date('Y'));//月初

$endThismonth=mktime(23,59,59,date('m'),date('t'),date('Y'));//月末