簡單的上一頁下一頁實現
手机用户105971037
手机用户105971037 2019-12-16 15:52:53
0
0
1231
     $front=db('archives')->where("id>".$aid)->order('id asc')->limit('1')->find();//上一页        $this->assign('front',$front);//上一页
        $after=db('archives')->where("id<".$aid)->order('id desc')->limit('1')->find();//下一页        $this->assign('after',$after);//下一页
<div class="point">             <p>上一篇:<a href="{:url('Article/index',array('aid'=>$front['id']))}">{$front['title']}</a></p>            <p>下一篇:<a href="{:url('Article/index',array('aid'=>$after['id']))}">{$after['title']}</a></p> </div>

在沒有訊息這個怎麼寫:www.hbsjsd.cn

手机用户105971037
手机用户105971037

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!