今天小编就把帝国cms取数据内容id的方法告诉大家!
方法
//随机数开始
$zs=$empire->gettotal("select count(*) as total from phome_ecms_news where classid=$classid");
$arr=array();
while(count($arr)<10)
{
$arr[]=mt_rand(1,$zs);
$arr=array_unique($arr);
}
$sl=implode(" ",$arr);
//随机数结束