VPS参考测评推荐
专注分享VPS主机优惠信息
衡天云优惠活动
华纳云优惠活动
荫云优惠活动

如何解决phpcms的分页错误

主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情!
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作

如何解决phpcms的分页错误

如何解决phpcms的分页错误?

PHPCMS中分页错误的解决方案

打开/include/global.func.php查找函数pages($ total,$ page = 1,$ perpage = 20,$ URL rule =‘‘,$ array = array(),$catid = 0)您可以看到pages函数的结构如下所示:function pages(){...if(){...}否则{...} ...}将内容放在else中,即:

代码:

else { $ first page = pageurl($ URL rule,1,$ array);$prepage = pageurl($ URL rule,$ prepage,$ array);$nextpage = pageurl($ URL rule,$ next page,$ array);$ lastpage = pageurl($ URL rule,$pages,$ array);$ URL pre = pageurl($ URL rule,& amp#39;& amp#39;,$ array);}替换为

代码:

else {/* Modify paging-Start */* $ first page = pageurl($ URL rule,1,$ array);$prepage = pageurl($ URL rule,$ prepage,$ array);$nextpage = pageurl($ URL rule,$ next page,$ array);$ lastpage = pageurl($ URL rule,$pages,$ array);$ URL pre = pageurl($ URL rule,& amp#39;& amp#39;,$ array);*/

if((strpos(URL decode($ URL rule),& # 39;mod = phpcms & file = content & # 39)》0和strpos(URL decode($ URL rule),& # 39;mod = phpcms & file = content & action = manage & # 39;)类别($catid,$prepage,1);$nextpage = $url-》类别($catid,$nextpage,1);$lastpage = $url-》类别($catid,$pages,1);$urlpre = $url-》类别($catid,& # 39;', 1);} else { $ first page = pageurl($ URL rule,1,$ array);$prepage = pageurl($ URL rule,$ prepage,$ array);$nextpage = pageurl($ URL rule,$ next page,$ array);$ lastpage = pageurl($ URL rule,$pages,$ array);$ URL pre = pageurl($ URL rule,& amp#39;& amp#39;,$ array);}/*修改分页- End */}最终页面如下:功能页面($ total,$ page = 1,$ perpage = 20。',$array = array(),$ catid = 0){ global $ PHPCMS;if($ total《1)return & # 39;';if($ URL rule = = & # 39;')$ URL rule = URL _ par(& # 39;page = { $ page } & # 39);$ pages = ceil($ total/$ per page);$ page = min($ pages,$ page);$ prepage = $ page-1;$ prepage = max($ prepage,1);$ next page = $ page+1;$ next page = min($ next page,$ pages);if($ catid){ $ URL = load(& # 39;URL . class . PHP & # 39;);$firstpage = $url-》类别($catid,1,1);$prepage = $url-》类别($catid,$prepage,1);$nextpage = $url-》类别($catid,$nextpage,1);$lastpage = $url-》类别($catid,$pages,1);$urlpre = $url-》类别($catid,& # 39;', 1);} else {/*修改分页-Start */* $ first page = pageurl($ URL rule,1,$ array)。$prepage = pageurl($ URL rule,$ prepage,$ array);$nextpage = pageurl($ URL rule,$ next page,$ array);$ lastpage = pageurl($ URL rule,$pages,$ array);$ URL pre = pageurl($ URL rule,& # 39;',$ array);*/if((strpos(URL decode($ URL rule),& # 39;mod = phpcms & file = content & # 39)》0和strpos(URL decode($ URL rule),& # 39;mod = phpcms & file = content & action = manage & # 39;)类别($catid,$prepage,1);$nextpage = $url-》类别($catid,$nextpage,1);$lastpage = $url-》类别($catid,$pages,1);$urlpre = $url-》类别($catid,& # 39;', 1);} else { $ first page = pageurl($ URL rule,1,$ array);$prepage = pageurl($ URL rule,$ prepage,$ array);$nextpage = pageurl($ URL rule,$ next page,$ array);$ lastpage = pageurl($ URL rule,$pages,$ array);$ URL pre = pageurl($ URL rule,& amp#39;& amp#39;,$ array);}/*修改分页-End */} $ data = str _ replace(& # 39;"', '/"',$ PHPCMS【& # 39;pageshtml & # 39]);eval(“/$ URL =//$ data/“););返回$ url}PHP中文网站,很多免费的PHPCMS教程,欢迎在线学习!

这几篇文章你可能也喜欢:

本文由主机参考刊发,转载请注明:如何解决phpcms的分页错误 https://zhujicankao.com/113979.html

【腾讯云】领8888元采购礼包,抢爆款云服务器 每月 9元起,个人开发者加享折上折!
打赏
转载请注明原文链接:主机参考 » 如何解决phpcms的分页错误
主机参考仅做资料收集,不对商家任何信息及交易做信用担保,购买前请注意风险,有交易纠纷请自行解决!请查阅:特别声明

评论 抢沙发

评论前必须登录!