请楼主帮帮忙,首页无法正常显示图片。我已经在本地测试过了,可是却能正常显示。上传到网站上,就不能显示了。我尝试删除缓存文件,再更新缓存,可是问题依然一样。(虽然在本地测试过了,可是只显示1张图片罢了。[虽然我已经在同一个主题上传很多图片附件])
一下是首页四格pic.php的代码,希望大大能够帮帮忙。- <?php
- /*
- design by Clement
- change by xuon
- */
- //---设置---start
- $shownums = 6;//演示个数 6以内
- $searchnums = 18;//搜索总数.
- $cachelife = 1800;//缓存时间.
- $orderby = 'dateline';//搜索顺序:按日期dateline.按浏览次数downloads.随机rand.
- $cachename = 'showpic';//缓存名.若与何插件冲突请修改,只要不冲突不会影响使用.
- $searchfid = '';//搜索fid范围.不限制留空.请用逗号相隔,如'1,2,3'.
- //---设置---end
- if((@!include('forumdata/cache/cache_'.$cachename.'.php')) || $expiration < time() || $cacheshownums != $shownums || $cachesearchnums != $searchnums || $cachecachelife != $cachelife || $cacheorderby != $orderby || $cachecachename != $cachename || $cachesearchfid != $searchfid) {
- require_once './include/common.inc.php';
- $orderby = $orderby != 'rand' ? 'attach.'.$orderby : 'rand()';
- $fids = $searchfid ? 'AND '."t.fid IN ($searchfid)" : '';
- $data = array();
- $query = $db->query("SELECT attach.aid, attach.thumb, attach.attachment, t.tid, t.fid, t.subject FROM {$tablepre}attachments attach LEFT JOIN {$tablepre}threads t ON t.displayorder>=0 AND t.tid=attach.tid WHERE attach.readperm='0' AND displayorder>='0' AND filetype='image/pjpeg' $fids GROUP BY attach.tid ORDER BY $orderby DESC LIMIT $searchnums");
- while ($pic = $db->fetch_array($query)) {
- $data['pic'][$pic[aid]]['showpicpics'] = $attachurl.'/'.$pic['attachment'].($pic['thumb'] ? 'thumb.jpg' : ""); $data['pic'][$pic[aid]]['showpiclinks'] = "viewthread.php?tid=$pic[tid]";
- $data['pic'][$pic[aid]]['showpictexts'] = str_replace('\'', ' ',$pic['subject']);
- }
- $data['expiration'] = $cachelife + time();
- $data['cacheshownums'] = $shownums;
- $data['cachesearchnums'] = $searchnums;
- $data['cachecachelife'] = $cachelife;
- $data['cacheorderby'] = $orderby;
- $data['cachecachename'] = $cachename;
- $data['cachesearchfid'] = $searchfid;
- require_once DISCUZ_ROOT.'./include/cache.func.php';
- writetocache($cachename, '', getcachevars($data));
- include(DISCUZ_ROOT.'./forumdata/cache/cache_'.$cachename.'.php');
- }
- shuffle($pic);
- $i = 0;
- $j = 0;
- while ($j < $shownums && isset($pic[$i])) {
- if(is_readable($pic[$i]['showpicpics'])) {
- $showpicpics .= $comma.$pic[$i]['showpicpics'];
- $showpiclinks .= $comma.$pic[$i]['showpiclinks'];
- $showpictexts .= $comma.$pic[$i]['showpictexts'];
- $comma = '|';
- $j++;
- }
- $i++;
- }
- ?>
- var swf_width=255
- var swf_height=175
- var config='5|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'
- //-- config 参数设置 -- 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字颜色|当前按键颜色|普通按键色彩 --
- var files='<?=$showpicpics?>'
- var links='<?=$showpiclinks?>'
- var texts='<?=$showpictexts?>'
- document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
- document.write('<param name="movie" value="images/focus.swf" />');
- document.write('<param name="quality" value="high" />');
- document.write('<param name="menu" value="false" />');
- document.write('<param name=wmode value="opaque" />');
- document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
- document.write('<embed src="images/focus.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
- document.write('</object>');
复制代码
还有在这个网站有个怪怪的问题。就是当我还未登陆时,在显示图片那格是可以看到有flash的,可是在登陆之后,原本该显示图片那格却没有看到flash的咚咚。
真的很谢谢你了! |