db->listinfo($where,'listorder ASC, id desc')" and refresh the background. .">
How to modify the sorting of phpcms: 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.
phpcmsThe background articles are sorted according to the number you entered:
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. Use sublime or other software to open it. I am using sublime
There are too many codes, use the shortcut key [Ctrl F] (this is the shortcut key for sublime software, other software may not be this) to search [$datas = $this->db->listinfo($where,'id desc',$_GET['page']);】
Find this After running the code: directly modify it to [$datas = $this->db->listinfo($where,'listorder ASC, id desc',$_GET['page']);], you can also comment out the original Add a line at the end of the code, like I did, so that if there is a problem with the code, you can modify it back.
listinfo($where,'id desc',$_GET['page']);
Note: The original code sorts by ID in reverse order by default.
$datas = $this->db->listinfo($where,'listorder ASC, id desc',$_GET['page']);
After modification, the list priority is used to sort in ascending order
Refresh the background interface, reorder, and view the effect in the foreground
The above is the detailed content of How to modify the sorting of background articles in phpcms. For more information, please follow other related articles on the PHP Chinese website!