dedecms 時間格式與參數設置,織夢文章
導讀:織夢文章這是我從織夢官方論壇上找來的詳細的dedecms 時間格式與參數設置,發出來,給大家共享。織夢模板免費下裁dede模板下載。
這是我從織夢官方論壇上找來的詳細的織夢模板 時間格式與參數設置,發出來,給大家共享。
{dede:field name='pubdate' function='strftime("%Y年%m月%d日 %H:%M:%S","@me")' /}2007年1月1日 18:30:02 {dede:field name='pubdate' function='strftime("%Y-%m-%d %H:%M:%S","@me")' /}2007-1-1 18:30:02 {dede:field name='pubdate' function='strftime("%Y年%m月%d日 %H時%M分%S秒","@me")' /}2007年1月1日 18時30分02秒 {dede:field name='pubdate' function='strftime("%m-%d %H:%M:%S","@me")' /}1-1 18:30:02 {dede:field name='pubdate' function='strftime("%m-%d","@me")' /}1-1 %Y-年 %m-月 %d-日 %H-小時 %M-分 %S-秒 24小時內的時間顯示紅色.. [field:pubdate runphp教程='yes'] $a="<font color='#ff0000'>"; $b="</font>"; $c=strftime("%Y年%m月%d日 %H:%M:%S","@me"); $ntime = time(); $oneday = 3600 * 24; if(($ntime - @me)<$oneday) @me = $a.$c.$b; else @me =$c; [/field:pubdate] 最后更新時間 最后更新時間:{dede:tagname runphp='yes'}@me = date("Y-m-d H:i:s", time());{/dede:tagname} XX天前 [field:pubdate runphp='yes'] $today = Floor(time()/(3600 * 24)); $senday= Floor(@me/(3600 * 24)); $updays = $today-$senday; if($updays==織夢模板免費下裁0) @me = &quo織夢模板t;今日"; else @me = $updays."天前"; [/field:pubdate]
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-21 ,文章dedecms 時間格式與參數設置,織夢文章主要講述參數設置,標簽,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_33233.html