Home > php教程 > php手册 > body text

php页码形式分页函数,支持静态化地址

WBOY
Release: 2016-06-06 20:02:08
Original
996 people have browsed it

之前每次遇到分页,总是得自己写,觉得挺繁琐的,所以本着通用的原则,写了一个分页的方法,特此记录。 目前此分页支持静态化地址分页和无链接地址时的ajax分页(但是js得自己写): 支持的静态地址如下:www.example.com/xxx-xxx-p1-xxxx-xx.html 其他形式

之前每次遇到分页,总是得自己写,觉得挺繁琐的,所以本着通用的原则,写了一个分页的方法,特此记录。


     目前此分页支持静态化地址分页和无链接地址时的ajax分页(但是js得自己写):


     支持的静态地址如下:www.example.com/xxx-xxx-p1-xxxx-xx.html

         其他形式静态化需根据自己情况进行改写


     支持ajax方式分页时,$link参数为空,但提供了pid和optype,其中pid用于获取该页码页数,optype用于一个页面存在多个分页时区分当前触发动作属于哪个分页逻辑




Copy after login


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!