复aze代码 代码如下:
/**
* 표시 스타일 2
*/
function multi($mpurl,$page = 10 ) {
$multipage = '';
$mpurl .= strpos($mpurl, '?') ? '&' : '?';
$realpages = 1;
if($this->infocount > $this->items) {
$offset = 2;
$realpages = @ceil($this->infocount / $this->items);
$pages = $this->maxpages && $this->maxpages < $리얼페이지 ? $this->maxpages : $realpages;
if($page > $pages) {
$from = 1;
$to = $페이지;
} else {
$from = $this->pageno - $offset;
$to = $from $page - 1;
if($from < 1) {
$to = $this->pageno 1 - $from;
$from = 1;
if($to - $from < $page) {
$to = $page;
}
} elseif($to > $pages) {
$from = $pages - $page 1;
$to = $페이지;
}
}
$multipage = ($this->pageno - $offset > 1 && $pages > $page ? '1 ...' : '').
($this->pageno > 1 ? '<< ' : '');
for($i = $from; $i <= $to; $i ) {
$multipage .= $i == $this->pageno ? ''.$i.'' :''.$i.'';
}
$multipage .= ($this->pageno < $pages ? '>>': '').
($to < $pages ? '... '.$realpages.'' : '').
($pages > $page ? '' : '');
$multipage = $multipage ? '
以上就介绍了discuz x2.5 php仿discuz分页效果代码, 包括了discuz x2.5면적内容, 希望对PHP教程有兴趣的朋友有所帮助.