如下圖所示:
解決辦法:用兩個(gè)date()函數(shù)分別格式化發(fā)布時(shí)間
在列表內(nèi)容模板頁(yè)
列表模板啟用list.var支持程序代碼,然后用:
$listtemp=' 月份:'.date("Y-m",$r[newstime]).'<br>日:'.date("d",$r[newstime]).'<br>其它模板內(nèi)容 ';
在內(nèi)容頁(yè):
<?=date("Y-M",$navinfor[newstime])?>
在php中
<?=date('Y-m-d',$r[newstime])?>