onethink二次开发时,时间日期转换函数
1 2 3 |
time_format($time = NULL,$format='Y-m-d H:i') 说明:时间戳格式化,与date函数功能相同,只是参数顺序不同 参数 int $time |
在模板中这样使用
1 2 3 4 5 6 7 8 9 10 |
<div class="x4"> <!--来自涛哥笔记 http://blog.kydbk.com--> <h3 class="margin-big-bottom bg-green bg-inverse padding">公司新闻</h3> <ul class="margin-big-top list-text list-underline"> <volist name="news" id="new" empty="暂时没有数据"> <li><span class="float-right">{$new.create_time|time_format=###,'Y-m-d'}</span><a href="/news/{$new.name}" >{$new.title}</a></li> </volist> </ul> <!--https://www.phpnote.cc提供--> </div> |
好了,问题解决了。给小站赞一个吧。