楼主你好!根据你的描述,让我来给你回答!
用list.var支持程序代码,然后用:date("Y",$r[newstime]) 和 date("m-d",$r[newstime]) 分别调用。
希望能帮到你,如果满意,请记得采纳哦~~~
灵动标签
[e:loop={1,2,0,1}]
<p>
年:<?=date('Y',$bqr[newstime])?>
月:<?=date('m',$bqr[newstime])?>
日:<?=date('d',$bqr[newstime])?>
时:<?=date('H',$bqr[newstime])?>
分:<?=date('i',$bqr[newstime])?>
秒:<?=date('s',$bqr[newstime])?>
</p>
[/e:loop]
把下面代码加到帝国cms内容页模板最头部。
<?php
$xq=date('Y-m-d',$navinfor[newstime]); //发布时间
$y=date('Y',$navinfor[newstime]); //调用当前文章的发布年份
$m=date('m',$navinfor[newstime]); //调用当前文章的发布月份
$d=date('d',$navinfor[newstime]); //调用当前文章的发布几号
$weekarray=array("日","一","二","三","四","五","六");
$date=$weekarray[date("w",strtotime($xq))];
?>
在帝国cms内容页模板需要显示的地方加入以下代码。
<?=$y?>年<?=$m?>月<?=$d?>号,星期<?=$date?>