只需一步,快速开始
使用道具 举报
<!--{eval $cachefile = S_ROOT.'./data/cache_index_hotusers.txt'; $cachetime = @filemtime($cachefile); $i_face = array(); if($_SGLOBAL['timestamp'] - $cachetime > 900) { //55位热门用户 $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('space')." s LEFT JOIN ".tname('spacefield')." sf ON sf.uid=s.uid WHERE s.avatar=1 ORDER BY s.friendnum DESC LIMIT 0,55"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $i_face[] = $value; } swritefile($cachefile, serialize($i_face)); } else { $i_face = unserialize(sreadfile($cachefile)); } }--> <!--{loop $i_face $value}--> <li><a href="space.php?uid=$value[uid]" title="$value[username]" ><!--{eval echo avatar($value['uid'], 'small');}--></a></li> <!--{/loop}-->
二楼虽为正解,就是复制的代码多了点,其实就改个数就OK cullam 发表于 2010-2-25 18:39
本版积分规则 发表回复 回帖后跳转到最后一页
手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )
GMT+8, 2024-6-2 10:30 , Processed in 0.870693 second(s), 18 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2023, Tencent Cloud.