Home > php教程 > php手册 > thinkphp 一个页面使用2次分页的方法

thinkphp 一个页面使用2次分页的方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:28:58
Original
1083 people have browsed it

thinkphp内置ORG.Util.Page方法分页,使分页变得非常简单快捷。

但是如果一个页面里需要使用2次分页,就会产生冲突,这里先记录下百度来的解决办法

可以说是毫无技术含量的办法:

  将Page.class.php复制重命名一个,如nPage.class.php.

  并在nPage.calss.php中将

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

  改为

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

  当然类名也记得要改为nPage.class.php,然后就在php里直接引用这个类分页,就不会和原来的冲突了……

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
Latest Issues
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
ThinkPHP Why use composer?
From 1970-01-01 08:00:00
0
0
0
thinkphp versions supported by php6
From 1970-01-01 08:00:00
0
0
0
thinkphp upload files
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template