2# hudielan  
 
哦 不好意思啊 是我没太说清楚 就我在space_feed.php文件加如下代码: 
 
        //个人图片排行 
        $summarylen = 16; 
        $query = $_SGLOBAL['db']->query("SELECT *, (select username from ".tname('member')." member where pic.uid = member.uid limit 1) as username FROM ".tname('pic')." pic ORDER BY pic.ed_hit desc,  pic.dateline DESC LIMIT 6"); 
        while ($value = $_SGLOBAL['db']->fetch_array($query)) { 
            $value['pic'] = mkpicurl($value); 
            $value['ctitle'] = strlen($value['title'])>$summarylen?getstr($value['title'], $summarylen, 0, 0, 0, 0, -1) . '..' value['title']; 
            $hit_pic_list[] = $value; 
        }         
结果导致首页发生错位 查看源码时发现是css样式没调过来 该css样式在header.htm里 
代码如下, 
<!--{if !empty($_SGLOBAL['space_theme'])}--> 
@import url(template/default/style.css); 
@import url(theme/$_SGLOBAL[space_theme]/style.css); 
<!--{else}--> 
@import url(template/$_SCONFIG[template]/style.css); 
<!--{/if}--> 
<!--{if !empty($_SGLOBAL['space_css'])}--> 
$_SGLOBAL[space_css] 
<!--{/if}--> 
红色部门为出错部分,查看源码是发现$_SGLOBAL[space_theme]这个变量为空 
 
后来我把space_speed.php加的代码删掉后,更新缓存,发现问题依然存在  
 
个人认为是页面执行的速度大于$_SGLOBAL[space_theme]这个变量传递的速度 不知道这样说是不是更清楚 谢谢回复 |