自己写了一个PHP首页来调用UCHOME的内容,但是头像死活调不出来,请问是什么原因呢?
谢谢!
PHP代码如下:- require_once './home/common.php';
- //最后登录名
- $membername = empty($_SCOOKIE['loginuser'])?'':sstripslashes($_SCOOKIE['loginuser']);
- $wheretime = $_SGLOBAL['timestamp']-3600*24*30;
- //总会员
- $spacecount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('space')), 0);
- //获得缓存
- $caches = data_get('index_cache', 1);
- $caches['dateline'] = intval($caches['dateline']);
- if($_SCONFIG['networkupdate'] && $_SGLOBAL['timestamp'] - $caches['dateline'] < $_SCONFIG['networkupdate']) {
- @$caches['datavalue'] = unserialize($caches['datavalue']);
- @extract($caches['datavalue']);
-
- } else {
-
- //热门空间
- $spacelist = array();
- $query = $_SGLOBAL['db']->query("SELECT uid,username,name,namestatus FROM ".tname('space')."
- WHERE updatetime>'$wheretime' ORDER BY viewnum DESC LIMIT 0,6");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);//实名
- $spacelist[] = $value;
- }
- //大家的最新动态
- $feedlist = array();
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('feed')." WHERE friend='0' ORDER BY dateline DESC LIMIT 0,10");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username']);
- $feedlist[] = $value;
- }
-
- //缓存
- data_set('index_cache', array(
- 'feedlist' => $feedlist,
- 'spacelist' => $spacelist,
- '_SN' => $_SN
- ));
- }
-
- //获取实名
- realname_get();
- //格式化动态
- foreach ($feedlist as $key => $value) {
- $feedlist[$key] = mkfeed($value);
- }
- include template('index_template');
复制代码 模板代码如下:- <div class="avatar"><a href="/home/space.php?uid=$_SGLOBAL[supe_uid]" class="login_thumb"><img src="<!--{avatar($_SGLOBAL[supe_uid],small)}-->" alt="{$_SN[$_SGLOBAL[supe_uid]]}" /></a></div>
复制代码- <!--{loop $spacelist $value}-->
- <li>
- <div class="avatar48"><a href="home/space.php?uid=$value[uid]"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
- </li>
- <!--{/loop}-->
复制代码 访问代码- <div class="avatar48"><a href="home/space.php?uid=1"><img src="http://mydomain.com/uc/images/noavatar_small.gif" alt="myname" /></a></div>
复制代码 |