1、创建自定义函数

    1. function my_pms_list($uid, $page, $pagesize) {
    2. $ci = &get_instance();
    3. $ci->load->add_package_path(FCPATH.'app/pms/');
    4. $ci->load->model('pm_model');
    5. $ci->pagesize = $pagesize;
    6. return $ci->pm_model->limit_page($uid, $page);
    7. }

    2、使用方法

    1. {php $list=my_mps_list(1, 1, 9999);}
    2. {loop $list $t}
    3. {php $m=dr_member_info($t.uid);}
    4.  
    5. {if $t.lastauthor==$m.username}
    6. 我对{$t.tousername}说 :{$t.lastsummary}
    7. {else}
    8. {$t.tousername}对我说 :{$t.lastsummary}
    9. {/if}
    10.  
    11. 共{$t.pmnum}条,时间{dr_fdate($t.lastdateline)}
    12.  
    13. {/loop}

    文档最后更新时间:2017-04-10 15:23:58