来救救绝望的人吧!
<!--#include file="../include/common.asp"-->
<%
connstr="driver={microsoft access driver(*.mdb)};dbq="&server.MapPath("main.mdb")
id=Request.Querystring("id")
table=Request.Querystring("table")
img=Request.Querystring("img")
mime=Request.Querystring("mime")
IF id="" or img="" then Response.End
'构造SQL语句
IF mime="" then
sql="select top 1 "&img&" from "&table&" where id="&id
else
sql="select top 1 "&img&","&mime&" from "&table&" where id="&id
end if
rs.open sql,connstr 1,1
IF rs.eof then Response.End
Response.buffer=true
Response.Clear
IF mime<>"" then
Response.ContentType=Rs(1)
end if
Response.BinaryWrite Rs(0)
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>
img.asp文件像上面那么写的,可是也不能正常显示
显示页<img src="img.asp?id=<%=rs("id")%>">
出现的问题:图片不能正常显示,但是没有语法错误