thinkphp How to use 2 paging on a page_PHP tutorial

WBOY
Release: 2016-07-20 11:12:48
Original
832 people have browsed it

thinkphp has built-in ORG.Util.Page method for paging, which makes paging very simple and fast.

But if a page needs to be paginated twice, a conflict will occur. Here is the solution from Baidu

It can be said to be a method with no technical content:

Copy and rename Page.class.php, such as nPage.class.php.

and add

in nPage.calss.php

  $this->varPage=C('VAR_PAGE')?C('VAR_PAGE'):'p'

changed to

  $this->varPage=C('VAR_PAGE')?C('VAR_PAGE'):'np'

Of course, remember to change the class name to nPage.class.php, and then directly reference this class paging in php, so that it will not conflict with the original one...

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440404.htmlTechArticlethinkphp has built-in ORG.Util.Page method for paging, which makes paging very simple and fast. However, if a page needs to be paginated twice, a conflict will occur. Let’s first record the one from Baidu...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template