当前位置:主页-织梦技巧-
织梦教程:显示昨日今日时间不同效果
[field:pubdate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
$oneday1 = 2 * 3600 * 24;
if(($ntime – @me)< $oneday)
{ @me = ‘<b class="color5">今 日</b>’;}
elseif (($ntime – @me)< $oneday1)
{@me = ‘<b class="color2">昨 日</b>’;
}
else
{ @me = MyDate(‘Y.m:d’,@me);}
[/field:pubdate]
转发请保留本文链接:织梦教程:显示昨日今日时间不同效果 http://www.seohuizhou.com/dede/32356.html