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

WBOY
Libérer: 2016-06-13 12:38:19
original
839 Les gens l'ont consulté

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

<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>
Copier après la connexion
Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal