帝国cms列表页怎么设置时间的格式
展开阅读全文

首先需要打开后台的列表页模板

$listtemp='<li class="news-item"><a title="[!--title--]"  href="[!--titlepic--]" target="_self">
        <div class="news-tit "><div class="fl news-span1"><div class="news-time">
                    <div class="news-time-date">
                        <span>'.date("m",$r[newstime]).'</span>/<span>'.date("d",$r[newstime]).'</span>
                    </div>
                    <div class="news-time-year">'.date("Y",$r[newstime]).'</div>
                </div>
            </div>
            <div class="fl news-span2">
                <div class="news-action ">
                    <p class=" news-title ">[!--title--]</p>
                    <p class="news-desc ">[!--smalltext--]</p>
                    <div class="label-box">
                    </div>
                </div>
            </div>
        </div>
    </a>
</li>';

同时列表模板勾选右下角的“使用程序代码”