array('>'=>$times_tamp_a)), array('views'=>-1), 1, 10, 'tid'); thread_list_access_filter($hotlist, $gid); cache_set($cachename, $hotlist,3600);//设置缓存 和 过期时间 } ?> console.log(\'log:'.$text.'\');'; } //获取回复最多的文章,默认10篇 function get_site_top_list(){ $result = cache_get('get_site_top_list'); if(empty($result)){ $result = db_find('thread', array(), array('views'=>2));//按views倒序 cache_set('get_site_top_list',$result,86400);//有效期1天 } return $result; } ?>
    '; foreach ($toplist as $key => $value){ $_class = $key < 3 ? 'jb-blue' : 'badge-secondary'; echo '
  • '.($key+1).''.$value['subject'].'
  • '; } echo '
'; ?>