linhuiming
因上努力,果上随缘

4.4 应用举例 猜你喜欢

  • LinHuiMing

4.4 应用举例 猜你喜欢

    <div class="whitebg suiji">      <h2 class="side-title">猜你喜欢</h2>      <ul>            [e:loop={'selfinfo',10,0,0,'','rand()'}]            <li><a target="_blank"  href="<?=$bqsr['titleurl']?>"><?=$bqr['title']?></a></li>            [/e:loop]      </ul>    </div>
<?php$randnum=10; //随机数量$randids='';$randdh='';for($i=1;$i<=$randnum;$i++){$randids.=$randdh.rand(1,100000); //1为最小ID,100000为最大ID$randdh=',';}?>[e:loop={栏目ID,显示条数,操作类型,只显示有标题图片,"id in ($randids)"}]//模板代码内容[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news  order by rand() desc limit 10",0,24,0}]   <li><a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a></li>[/e:loop]
  • YES
  • NO
更多>>

相关文章