首頁 >後端開發 >php教程 >新手提问分页类的一个输出循环显示分页遇到有关问题,求解

新手提问分页类的一个输出循环显示分页遇到有关问题,求解

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2016-06-13 11:34:04992瀏覽

新手提问分页类的一个输出循环显示分页遇到问题,求解?

<br><?php <br />class PageClass {<br>	private $total_record;//总记录<br>	private $page_size;//页记录数<br>	private $current_page;//当前页<br>	private $total_page_size;//总页数<br>	private $page_url;   //页面url<br>	private $page_start;  //起始页<br>	private $page_stop;//结束页<br>	public $page_limit;  //limit,<br>    function __construct($total_record=0,$page_size=1,$current_page=1,$page_url) {<br>    	$this->total_record=$this->numeric($total_record);<br>    	$this->page_size=$this->numeric($page_size);<br>    	$this->current_page=$this->numeric($current_page);<br>    	$this->page_limit=($this->current_page*$this->page_size)-$this->page_size;<br>        $this->page_url=$page_url;<br>        if($this->current_page        	$this->current_page=1;<br>        }<br><br>        if($this->current_page        	$this->current_page=0;<br>        }<br>        $total_page_size = ceil($total_record/$page_size);<br><br>        if($this->total_page_size        	$this->total_page_size=1;<br>        }<br>        if($this->current_page>$this->total_page_size){<br>        	$this->crrent_page=$this->total_page_size;<br>        }<br>        $this->page_start=$this->current_page;<br>        $this->page_stop=$this->current_page+5;<br>        if($this->page_stop>$this->total_page_size){<br>        	$this->page_stop=$this->total_page_size;<br>        	$this->page_start=$this->page_stop-5;<br>        }<br>        if($this->page_start        	$this->page_start=1;<br>        	if($this->page_stop > $this->total_page_size){<br>        		$this->page_stop=$this->total_page_size;<br>        	}<div class="clear">
                 
              
              
        
            </div>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn