|
"products"是数据源
"images"是数据表
"images"数据表只有两个字段,"id"和"img ",我把图片存储在"img ",但是用 img arc="127.0.0.1/tp.asp?id=1" 确不能打开图片,请大家帮我看看下面这段代码问题出在哪里?
谢谢!
[tp.asp]
<%
Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.Open "products"
set rec=server.createobject("ADODB.recordset")
strsql="select img from images where id=" & trim(request("id"))
rec.open strsql,objConn,1,1
Response.ContentType = "image/*"
Response.BinaryWrite rec("img").getChunk(7500000)
rec.close
set rec=nothing
%> |
|