复制代码
代码如下:
<ul>
<li>
<!–{get sql=”SELECT * FROM `phpcms_content` WHERE contentid>$contentid AND catid=$catid AND status=99 ORDER BY updatetime ASC” rows=”1″}–>
{php $front=1;}
上一篇:<a href=”{$r[url]}” titile=”{$r[title]}”>{str_cut($r[title],50)}</a>
{/get}
{if $front!=1}
上一篇:没有了
{/if}
</li>
<li>
<!–{get sql=”SELECT * FROM `phpcms_content` WHERE contentid<$contentid AND catid=$catid AND status=99 ORDER BY updatetime DESC” rows=”1″}–>
{php $next=1;}
下一篇:<a href=”{$r[url]}” titile=”{$r[title]}”>{str_cut($r[title],50)}</a>
{/get}
{if $next!=1}
下一篇:没有了
{/if}
</li>
</ul>
生成静态HMTL的网站,删除文章后,需要重新生成,要不然有一二篇文章的上一篇或下一篇是你删除的那个文章
Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard. Commenter avatars come from Gravatar.