How to implement 2 paging on a page in thinkphp

不言
Release: 2023-04-02 09:06:02
Original
1603 people have browsed it

This article mainly introduces the implementation method of using 2 paging on a page in thinkphp. It has certain reference value. Now I share it with you. Friends in need can refer to

thinkphp built-in ORG. The Util.Page method paging makes paging very simple and fast. However, if a page needs to be paginated twice, a conflict will occur. Here we will record Baidu’s solution. Friends in need can refer to

which can be said to be a non-technical method:
Copy and rename Page.class.php, such as nPage.class.php.
And change

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

to

$this->varPage=C('VAR_PAGE')?C('VAR_PAGE'):'np'
Copy after login
## in nPage.calss.php #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...


The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Introduction to php processing Chinese string interception (mb_substr) and obtaining the number of characters in Chinese strings

Regarding the efficiency issue of php address reference

dedecms page how to obtain member status

The above is the detailed content of How to implement 2 paging on a page in thinkphp. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!