之前讲过帝国CMS随机调用内容,有利于蜘蛛每次来抓取都能抓取到不同的信息,帝国cms怎么随机调动栏目呢?语句如下。
[e:loop={'s elect * from [!db.pre!]enewsclass where bclassid in(1) order by rand() desc limit 10',10,24,0}]
<?
if($bqr['classurl']=='')
{
$sccurl=$public_r['newsurl'].$bqr['classpath']."/";
}
else
{
$sccurl=$bqr['classurl']."/";
}
?>
<a target="_blank" href="<?=$sccurl?>"><?=$bqr['classname']?></a> |
[/e:loop]