打开phpcms的文件结构图,找到【phpcms\modules\content】中的content.php文件,注意:最好不要用记事本打开,使用sublime或者其他软件打开。我使用的是sublime
代码太多了,使用快捷键【Ctrl+F】(这里是sublime软件的快捷键,其他软件不一定是这个哦)搜索【$datas = $this->db->listinfo($where,'id desc',$_GET['page']);】
找到这行代码后:直接修改成【$datas = $this->db->listinfo($where,'listorder ASC, id desc',$_GET['page']);】,你也可以先注释原代码在后面加上一行,像我这种做法,万一代码出现问题可以修改回来。
listinfo($where,'id desc',$_GET['page']);
注:原代码默认是使用ID倒序来排序的,
$datas = $this->db->listinfo($where,'listorder ASC, id desc',$_GET['page']);
修改后优先使用列表排序升序来排的
刷新后台界面,重新排序后,在前台查看效果
phpcms后台文章排序怎么按自己输入的数字排列?
2018-07-18 18:12:16 来源: 评论:0 点击:
打开phpcms的文件结构图,找到【phpcms modules content】中的content php文件,注意:最好不要用记事本打开,使用sublime或者其他软件打开
上一篇:phpcms 添加内容 出现content_form.class.php on line 512解决方法
下一篇:phpcms 快速开发
分享到:
收藏
评论排行
- ·时间函数(1)