为何不能显示图片????帮我看看(在线等)asp+access
用前面这个文件显示就是显示不了,直接键入
showimg.asp?id=3
会提示下载文件showimg.asp,下了之后就是一堆二进制乱码
.....
<IMG SRC="showimg.asp?id=3" alt="无图片">
....
showimg.asp
<%
dim udb
udb="/db/db.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
myconn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&udb&"")
Conn.Open MyConn
set rst=server.createobject("ADODB.recordset")
sql="select image from smallctg where id="&trim(request("id"))
rst.open sql,conn,1,1
if not isempty(rst("image")) then
Response.ContentType = "image/*"
size=rst("image").ActualSize
Response.BinaryWrite rst("image").getChunk(size)
rst.close
set rst=nothing
set conn=nothing
else
response.write("无此图片!")
rst.close
set rst=nothing
set conn=nothing
end if
%>