郁闷!!!!高分寻求帮助
代码一样,我要从数据库中读取图片显示在网页上,为什么在不同的机子上有一台能够显示图片而另一台不能,我在不能显示图片的机子上将上网纪录清除,则也可以显示,谁能解决,高分。。。
数据库数据均没有问题。
数据库中有相应纪录、联接文件存在路径也对。
代码:
EditNews.asp:
<table><tr>
<td align="center" >
<img src="showphoto.asp?mid=<%=id%>" >
</td>
</tr></table>
showphoto.asp:
<!--#include file="../asp/ifroot.asp"-->
<!--#include file="../asp/opendb.asp"-->
<%
imgid=request("mid")
set conn1=opendb("conn")
Set imgrs=Server.CreateObject("ADODB.recordset")
sql="select images from news where id=" & imgid
imgrs.open sql,conn1,1,1
size=imgrs("images").ActualSize
Response.ContentType = "image/*"
Response.BinaryWrite imgrs("images").getChunk(7500000)
Response.end
imgrs.close
set imgrs=nothing
set conn1=nothing
%>