加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > phpcms > 正文

phpcms 实现上一篇下一篇的几种方法!!

发布时间:2020-12-14 02:15:10 所属栏目:phpcms 来源:网络整理
导读:第一种方法: 上一篇: {getsql="select contentid,catid,url,title from phpcms_content where contentid {/get}{if $front!=1}无{/if} 下一篇:{get sql="select contentid,title from phpcms_content where contentid > '$contentid' and catid='$catid'

第一种方法:

上一篇:
                        {get sql="select contentid,catid,url,title from phpcms_content where contentid < '$contentid' and catid='$catid' order by contentid desc" rows="1" return="v"}{php $front=1;}
                        
                        {/get}{if $front!=1}无{/if}


            

下一篇:{get sql="select contentid,title from phpcms_content where contentid > '$contentid' and catid='$catid' order by contentid asc" rows="1" return="s"}{php $front=2;}
                        {/get}{if $front!=2}无{/if}


第二种方法:

这种方法是js调用方法,需要下载附件中的一个php文件,放在网站根目录

上一篇:

 

第三种方法:

{get sql="select * from phpcms2008_content where contentid>$contentid and catid=$catid order by updatetime desc" rows="1"} 
 

{/get}
{get sql="select * from phpcms_content where  contentid<$contentid and catid=$catid order by updatetime desc" rows="1"} 

{/get}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读