1.通过数据库获取表中所有数据
$res= $db->getall($sql." limit ".(($page_current-1)*$page_size).",".$page_size);
2.通过smarty把数据传递到模版中
$smarty->assign('bm_list',$res);
3.在模版中通过foreach遍历
<!--{foreach from=$bm_list item=page}-->
4.在模版中输出时间
<td>{$page.bmsj|date_format:"%Y-%m-%d %H:%M:%S"}</td>
以上步骤之后出现的还是时间戳不是我们所用的日期,求解答 谢谢