【#文档大全网# 导语】以下是®文档大全网的小编为您整理的《日历的制作代码》,欢迎阅读!
日历的制作代码
$year=@$_GET['year']; //获得地址栏的年份 $month=@$_GET['month']; //获得地址栏的月份 if(empty($year)) $year=date("Y"); //初始化为本年度的年份 if(empty($month)) $month=date("n"); //初始化为本年度的月份 $day=date("j"); //获取当天的天数
$wd_ar=array("日","一","二","三","四","五","六"); //星期数组 $wd=date("w",mktime(0,0,0,$month,1,$year)); //计算当月第一天是星期几 //年链接
$y_lnk1=$year<=1970?$year=1970:$year-1; $y_lnk2=$year>=2037?$year=2037:$year+1; //月链接
$m_lnk1=$month<=1?$month=1:$month-1; $m_lnk2=$month>=12?$momth=12:$month+1;
echo""; ?>
本文来源:https://www.wddqxz.cn/3ce103d2fab069dc502201b2.html