当前位置:编程学习 > php >>

php 分页2

共<?php echo $totalnum;?>条 ;共<?php echo $pagecount;?>页;每页显示<?php echo $pagenum;?>条 
 
                            <a href="<?php echo $_SERVER['PHP_SELF']?>?page=1">首页</a>   
 
                            <a href="<?php echo $_SERVER['PHP_SELF']?>?page=<?php  if($page>1) echo  $page-1; else  echo $page=1;?>">上一页</a>   
 
 
 
 
 
                            <a href="<?php echo $_SERVER['PHP_SELF']?>?page=<?php if($page<$pagecount-1) echo $page+1; else echo $pagecount; ?>">下一页</a>   
 
 
 
                            <a href="<?php echo $_SERVER['PHP_SELF']?>?page=<?php echo $pagecount;?>">尾页</a>   

摘自 chaojie2009的专栏
补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,