In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to solve phpcms paging errors. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
How to solve the phpcms paging error?
The solution of PHPCMS pagination error
Open the / include/global.func.php lookup function function pages ($total, $page = 1, $perpage = 20, $urlrule ='', $array = array (), $catid = 0) and you can see that the pages function structure is as follows: function pages () {. If () {. } else {. }. } put the contents in the else, namely:
Code:
Else {$firstpage = pageurl ($urlrule, 1, $array); $prepage = pageurl ($urlrule, $prepage, $array); $nextpage = pageurl ($urlrule, $nextpage, $array); $lastpage = pageurl ($urlrule, $pages, $array); $urlpre = pageurl ($urlrule,', $array);}
Replace with
Code:
Else {/ * modify pagination-start * / * $firstpage = pageurl ($urlrule, 1, $array); $prepage = pageurl ($urlrule, $prepage, $array); $nextpage = pageurl ($urlrule, $nextpage, $array); $lastpage = pageurl ($urlrule, $pages, $array); $urlpre = pageurl ($urlrule,'', $array) * / if ((strpos (urldecode ($urlrule), 'mod=phpcms&file=content') > 0 and strpos (urldecode ($urlrule),' mod=phpcms&file=content&action=manage') category ($catid, $prepage, 1); $nextpage = $url- > category ($catid, $nextpage, 1); $lastpage = $url- > category ($catid, $pages, 1); $urlpre = $url- > category ($catid,', 1);} else {$firstpage = pageurl ($urlrule, 1, $array); $prepage = pageurl ($urlrule, $prepage, $array); $array = nextpage ($nextpage, $array, $nextpage) $lastpage = pageurl ($urlrule, $pages, $array); $urlpre = pageurl ($urlrule,'', $array);} / * modify pagination-end * /} the final pages is as follows: function pages ($total, $page = 1, $perpage = 20, $urlrule ='', $array = array (), $catid = 0) {global $PHPCMS; if ($total)
< 1) return ''; if($urlrule == '') $urlrule = url_par('page={$page}'); $pages = ceil($total/$perpage); $page = min($pages, $page); $prepage = $page - 1; $prepage = max($prepage, 1); $nextpage = $page+1; $nextpage = min($nextpage, $pages); if($catid) { $url = load('url.class.php'); $firstpage = $url->Category ($catid, 1,1); $prepage = $url- > category ($catid, $prepage, 1); $nextpage = $url- > category ($catid, $nextpage, 1); $lastpage = $url- > category ($catid, $pages, 1); $urlpre = $url- > category ($catid,', 1);} else {/ * modify pagination-start * / * $firstpage = pageurl ($urlrule, 1, $array) $prepage = pageurl ($urlrule, $prepage, $array); $nextpage = pageurl ($urlrule, $nextpage, $array); $lastpage = pageurl ($urlrule, $pages, $array); $urlpre = pageurl ($urlrule,'', $array); * / if (strpos (urldecode ($urlrule), 'mod=phpcms&file=content') > 0 and strpos (urldecode ($urlrule),' mod=phpcms&file=content&action=manage') category ($catid, $prepage, 1); $nextpage = $url- > category ($catid, $nextpage, 1); $nextpage = $lastpage > lastpage ($lastpage, $lastpage, 1) $urlpre = $url- > category ($catid,', 1);} else {$firstpage = pageurl ($urlrule, 1, $array); $prepage = pageurl ($urlrule, $prepage, $array); $nextpage = pageurl ($urlrule, $nextpage, $array); $lastpage = pageurl ($urlrule, $pages, $array); $urlpre = pageurl ($urlrule,'', $array) } / * modify pagination-end * /} $data = str_replace ('",'/', $PHPCMS ['pageshtml']); eval (" / $url = / "$data/"; "); return $url;} Thank you for reading! This is the end of the way to solve phpcms paging errors. I hope the above content can help you to some extent, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.