ZBLOG调用最新文章 最热文章 最多评论 教程 仅供参考,以下案例代码均为调用10篇文章,其他数量自行修改,代码很烂,能用就行。
{foreach GetList(10) as $newlist} <li><span>{$newlist.Time('m-d')}</span><a href="{$newlist.Url}" title="{$newlist.Title}">{$newlist.Title}</a></li> {/foreach}
{php} $order = array('log_ViewNums'=>'DESC'); $where = array(array('=','log_Status','0')); $array = $zbp->GetArticleList(array('*'),$where,$order,array(10),''); {/php} {foreach $array as $hotlist} <li><span>{$hotlist.ViewNums}℃</span><a href="{$hotlist.Url}" title="{$hotlist.Title}">{$hotlist.Title}</a></li> {/foreach}
{php} $order = array('log_CommNums'=>'DESC'); $where = array(array('=','log_Status','0')); $array = $zbp->GetArticleList(array('*'),$where,$order,array(10),''); {/php} {foreach $array as $hotlist} <li><span>{$hotlist.CommNums}评论</span> <a href="{$hotlist.Url}" title="{$hotlist.Title}">{$hotlist.Title}</a></li> {/foreach}
博主专注于Z-BLOG网站搭建、网站优化以及电脑故障排查、重装、优化、维修系统等,QQ/WX:2126245521(请注明来意)
Copyright © 2020-2023 Jack作品 Reserved.
Powered By Z-Blog Sitemap | 蜀ICP备2023025269号-1
Processed : 0.038 SQL : 14
本文暂无评论 - 欢迎您