PHP调用日期代码
演示效果小图
<span class="font12 month"><?php echo date("n")?>月</span> <span class="font18 day"><?php echo date("d")?></span> <ol> <li class=" week" style="">今天</li> <?php $weekarray=array("日","一","二","三","四","五","六"); $date="星期".$weekarray[date("w")]; ?> <li><?=$date?></li> </ol>
案列复制来的代码,大家可以自行修改格式。