In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What this article shares to you is about how to modify the ranking of phpcms background articles. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Phpcms modify the sorting method: first find the "content.php" file; then directly modify the code to "$datas = $this- > db- > listinfo ($where,'listorder ASC, id desc')" and refresh the background.
Phpcms background articles are sorted by the numbers you enter:
Method
Open the file structure diagram of phpcms and find the content.php file in [phpcms\ modules\ content]. Note: it is best not to open it with notepad, but with sublime or other software. I am using sublime
There is too much code. Use the shortcut key [Ctrl+F] to search for [$datas = $this- > db- > listinfo ($where,'id desc',$_GET ['page']).]
After finding this line of code: directly modify it to [$datas = $this- > db- > listinfo ($where,'listorder ASC, id desc',$_GET ['page']);], or you can comment on the original code first and add a line after it. As I do, you can modify it back in case there is something wrong with the code.
Listinfo ($where,'id desc',$_GET ['page'])
Note: the original code is sorted in reverse order using ID by default.
$datas = $this- > db- > listinfo ($where,'listorder ASC, id desc',$_GET ['page'])
After modification, priority is given to the use of list sort ascending order.
Refresh the background interface, reorder, and view the results in the foreground.
The above is how to modify the ranking of phpcms background articles, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.