php 分页类(第一版本),_PHP教程

WBOY
發布: 2016-07-13 10:39:21
原創
1006 人瀏覽過

此版本为第一版 , 以get 方式传递页码数及其他参数 .  

使用方法 :1  

getLimit();  

int(90)  ["end"]=> string(3) "100"   }

 

pageInfo($arr); 获取页码信息如下 : 首页,上一页 ,下一页,尾页等按实际情况显示

<span   </span><span <</span><span p</span><span ></span>总记录:<span <</span><span span </span><span style</span><span ="color:red"</span><span ></span>100<span </</span><span span</span><span ></span>条 页码7/10<span </</span><span p</span><span ><br />   <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=1"</span><span ></span>首页<span </</span><span a</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=6"</span><span ></span>上一页<span </</span><span a</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=5"</span><span ></span>5<span </</span><span a</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=6"</span><span ></span>6<span </</span><span a</span><span ><br />  <</span><span span</span><span ></span>7<span </</span><span span</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=8"</span><span ></span>8<span </</span><span a</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=9"</span><span ></span>9<span </</span><span a</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=8"</span><span ></span>下一页<span </</span><span a</span><span ><br />  <</span><span a </span><span href</span><span ="/index.php/index/pro?heng=1&page=10"</span><span ></span>尾页<span </</span><span a</span><span ></span>
登入後複製

      

      pageInfo() 默认参数及顺序为 'count','first','count','pre','listing','next','last' . 可自行设置:

<span 1</span>      <span $arr</span>   = <span array</span><span ( 
</span><span 2</span>               'count','first','pre','listing','next','last'
<span 3</span> <span        );
</span><span 4</span>       <span $pageInfo</span> = <span $page</span>->pageInfo(<span $arr</span>);
登入後複製

      4 可以使用 setPageListNum() 方法设置页码显示个数

 <span $page</span>->setPageListNum(<span $num</span>); 
登入後複製

      

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/732357.htmlTechArticle此版本为第一版 , 以get 方式传递页码数及其他参数 . 使用方法 :1 总记录: 100 条 页码7/10 首页 上一页 5 6 7 8 9 下一页 尾页 pageInfo() 默认参...
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板