注册 登录
编程论坛 ASP技术论坛

读取不到图片

等待冰柠檬 发布于 2010-05-06 09:25, 498 次点击
程序代码:
            <%
            
Call openDataBase()
            
set gsxw = Server.CreateObject("Adodb.recordset")
             gsxw.open
"SELECT top 3 * FROM Sbe_News WHERE TID<>8 and datepart('yyyy',newsdate)=datepart('yyyy',now()) and photoNew = -1 order by newsdate desc ",conn,1,1
%>
            <%for i=0 to gsxw.recordcount%>
            <%if i=0 then%>
            <img id="pic" src="uploadfile/<%=gsxw("pic")%>" width="280" height="164" />
            <%end if%>
            <%gsxw.movenex%>
            <%next%>
查看IE 图片没的。。。。
只显示 src="uploadfile/"
保证路径是正确的
只有本站会员才能查看附件,请 登录


[ 本帖最后由 等待冰柠檬 于 2010-5-6 09:54 编辑 ]
7 回复
#2
liyang04302010-05-06 09:47
不会,顶
#3
liyang04302010-05-06 09:53
newsdate   是什么东西呀?
#4
等待冰柠檬2010-05-06 10:08
时间
#5
liyang04302010-05-06 10:11
<%
set conn=server.createobject("adodb.connection")
conn.open "select * from message",conn,1,1
%>
<%
call opendatabase()
set gsxw=sever.createobject("adodb.recordset")
sqlstr="select top 3* from sbe_news where tid<>8 and datepart('yyyy',newsdate)=datepart('yyyy',now()) and photonew=-1 order by newsdate desc "
gsxw.open.sqlstr,conn,1,3
for i=0 to gsxw.recordcount
if i=0 then
img id="pic"  src="upload file/<%=gsxw("pic")%>" width="280" height="164"/>
end if
gsxw.movenext
next
%>
#6
liyang04302010-05-06 10:11
学习了
#7
等待冰柠檬2010-05-06 10:16
楼上的朋友 还是不行的。。有问题。。。
#8
zmqingaa2010-05-10 16:33
src="uploadfile/<%=gsxw("pic")%>" 这句话有问题吧
1