thinkPHP page.class.php show方法最后部分 $linkPage=" "; for($i=1;$i=$this-totalPages;$i++)//rollpages=totalPages { if(($this-nowPage - $now_cool_page) = 0 ) { $page = $i; } elseif(($this-nowPage + $now_cool_page - 1) = $this-totalPage
thinkPHP page.class.php show方法最后部分
$linkPage=" ";
$page_str = str_replace(
array('%HEADER%', '%NOW_PAGE%', '%UP_PAGE%', '%DOWN_PAGE%', '%FIRST%', '%LINK_PAGE%', '%END%', '%TOTAL_ROW%', '%TOTAL_PAGE%','%SELECT_PAGE%'),
array($this->config['header'], $this->nowPage, $up_page, $down_page, $the_first, $link_page, $the_end, $this->totalRows, $this->totalPages,$linkPage),
$this->config['theme']);
return "
{$page_str}
";
调用代码 重置
$p = new \Think\Page($article_sum,C(PAGESIZE));
$p->rollPage = 1;
$p->setConfig('header', '
共%TOTAL_ROW%条记录 第%NOW_PAGE%页/共%TOTAL_PAGE%页%SELECT_PAGE%');
$p->setConfig('prev', '上一页');
$p->setConfig('next', '下一页');
$p->setConfig('last', '末页');
$p->setConfig('first', '首页');
$p->setConfig('theme', '%FIRST%%UP_PAGE%%LINK_PAGE%%DOWN_PAGE%%END%%HEADER%','%SELECT_PAGE%');
$article_info=array_slice($article_info,$p->firstRow,$p->listRows);
$this->assign('page',$p->show());
1503487419(1).jpg