织梦会员空间主页文章列表无法分页解决办法

织梦DedeCMS 5.7会员空间文章列表分页显示不正常,总是显示0页0条记录错误。下面告诉大家如何解决这个问题:找到并打开include/arc.memberlistview.class.php文件,在里面找到下面这句代码:

$countQuery = preg_replace("/select[ \r\n\t](.*)[ \r\n\t]from/i","Select count(*) as dd From",$this->sourceSql); 修改为: $countQuery = preg_replace("#SELECT[ \r\n\t](.*)[ \r\n\t]FROM#is", 'SELECT COUNT(*) AS dd FROM', $this->sourceSql); $countQuery = preg_replace("#ORDER[ \r\n\t]{1,}BY(.*)#is", '', $countQuery);  

完成。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/f761a2d16078c81829ea40cb59133291.html