打开include/common.func.php ,插入
Copy to ClipboardLiehuo.Net Codes引用的内容:[]
function GetDateuk($mktime)
{
$oktime=time();
if ($oktime-$mktime<60)
{
return "刚刚";
}
if (($oktime-$mktime>=60) && ($oktime-$mktime<3600) )
{
$a=trim(ceil(($oktime-$mktime)/60));
return $a.'分钟前';
}
if (($oktime-$mktime>=3600) && ($oktime-$mktime<86400) )
{
$a=trim(ceil(($oktime-$mktime)/3600));
return $a.'小时前';
}
if (($oktime-$mktime>=86400) && ($oktime-$mktime<864000))
{
$a=trim(ceil(($oktime-$mktime)/86400));
return $a."天前";
}
if ($oktime-$mktime>=864000 )
{
return MyDate("Y-m-d",$mktime);
}
}
调用方法:
在/plus/feedback_ajax.php中,修改<?php echo GetDateTimeMk($dtime); ?>为:<?php echo GetDateuk($dtime); ?>