DEDECMS5.7会员空间文章分页总是显示"共 0 页/0条记录"的BUG修复教程

今天发现会员中心里,查看用户全部文章时,列表分页始终显示“共 0 页/0条记录”,分页无法正常显示,于是从网上找了一下,终于解决,特将此方法分享给各位:
修正办法“
打开include/arc.memberlistview.class.php
查找
$countQuery = preg_replace("/select[ rnt](.*)[ rnt]from/i","Select count(*) as dd From",$this->sourceSql);
修改为
$countQuery = preg_replace("#SELECT[ rnt](.*)[ rnt]FROM#is", 'SELECT COUNT(*) AS dd FROM', $this->sourceSql);
$countQuery = preg_replace("#ORDER[ rnt]{1,}BY(.*)#is", '', $countQuery);

这样,分页就可以正常显示了,希望能对你有所帮助。

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

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