1、创建自定义函数
function my_pms_list($uid, $page, $pagesize) { $ci = &get_instance(); $ci->load->add_package_path(FCPATH.'app/pms/'); $ci->load->model('pm_model'); $ci->pagesize = $pagesize; return $ci->pm_model->limit_page($uid, $page); }
2、使用方法
{php $list=my_mps_list(1, 1, 9999);} {loop $list $t} {php $m=dr_member_info($t.uid);} {if $t.lastauthor==$m.username} 我对{$t.tousername}说 :{$t.lastsummary} {else} {$t.tousername}对我说 :{$t.lastsummary} {/if} 共{$t.pmnum}条,时间{dr_fdate($t.lastdateline)} {/loop}
文档最后更新时间:2017-04-10 14:23:58