Function usage: calendar*/function calendar{ if $MM = date $YYYY =
date; if(checkdate{ $stringDate = strftime(“%d %b %Y”,mktime ; $days =
strftime(“%d”,mktime ; $firstDay = strftime(“%w”,mktime ; $lastDay =
strftime(“%w”,mktime (0,0,0,$MM,$days,$YYYY)); $printDays = $days;
$preMonth = strftime(“%m”,mktime ; $preYear = strftime(“%Y”,mktime ;
$nextMonth = strftime(“%m”,mktime ; $nextYear = strftime(“%Y”,mktime ;
print(“

“); print(“

P

新澳门31999 ,”); print(“

“.strftime(“%b %Y”,mktime .”

“); print(“

N

“); print(“

“); print(“

Sun

Mon

Tue

Wed

Thu

Fri

Sat

“); $currentDays = 1; for{ print(“

“); $diffDays = $firstDay-$lastDay; if($firstDay>$lastDay &&
$currentDays ==1 && { for($x=$lastDay;$x>=0;$x–){ $printDays =
$days-$x; print(“

新澳门31999PHP自动生成月历代码_php基础_脚本之家。$printDays

“); } for($z=1;$z$currentDays”); $currentDays++; } } elseif($firstDay!=0
&& $currentDays==1){ for($z=1;$z<=$firstDay;$z++){ print; }
for($y=$firstDay;$y<7;$y++){ print(“

$currentDays

“); $currentDays++; } } else { for($u=1;$u<=7 &&
$currentDays<=$days;$u++){ print(“

$currentDays

“); $currentDays++; } } print; } print; }}?>

发表评论

电子邮件地址不会被公开。 必填项已用*标注