帝國cms發(fā)布時間分開顯示日期和年份
如下圖所示:
解決辦法:用兩個date()函數(shù)分別格式化發(fā)布時間
在列表內(nèi)容模板頁
列表模板啟用list.var支持程序代碼,然后用:
$listtemp=' 月份:'.date("Y-m",$r[newstime]).'<br>日:'.date("d",$r[newstime]).'<br>其它模板內(nèi)容 ';
在內(nèi)容頁:
<?=date("Y-M",$navinfor[newstime])?>
在php中
<?=date('Y-m-d',$r[newstime])?>
責(zé)任編輯:實速科技