phpcms

关注公众号 jb51net

关闭
CMS教程 > phpcms >

phpcms文章页如何显示上一页下一页

脚本之家

本文主要分享了phpcms文章页显示上一页下一页的代码如下:


{get sql="select * from phpcms_content where contentid>$contentid and catid=$catid order by contentid" rows="1"}<div class="p_left">上一条:<a href="{$r[url]}">{str_cut($r[title], 50,'')}</a></div>{/get}
{get sql="select * from phpcms_content where contentid<$contentid and catid=$catid order by contentid desc" rows="1"}<div class="p_right">下一条:<a href="{$r[url]}">{str_cut($r[title],50,'')}</a></div>{/get}