图片以二进值存进server SQL,为什么图片会出现叉?
<!--#include file="conn.asp"--><%
nId = Trim(Request.QueryString("Id"))
nType = Trim(Request.QueryString("Type"))
Response.clear
Set objRs=Server.CreateObject("adodb.recordset")
If nType="1" Then
sql="SELECT newsimg FROM newstable WHERE newsid="&nId
objRs.Open sql,conn,1,3
'Response.ContentType = "text/xml"
'response.Write "NoImage.jpg"
response.ContentType="image/jpeg"
response.BinaryWrite objRs("newsimg")
Else If nType="9" Then
sql="SELECT zhaopian FROM guangrongbang WHERE weishiid="&nId
objRs.Open sql,conn,1,3
Response.ContentType = "image/jpeg"
Response.BinaryWrite objRs("zhaopian")
Else
sql="SELECT zhaopian FROM weishifengcai WHERE weishiid="&nId
objRs.Open sql,conn,1,3
Response.ContentType = "image/jpeg"
Response.BinaryWrite objRs("zhaopian")
End If
End If
objRs.Close
Set objRs= Nothing
closedb()
%>
这和路径没关系吧,直接通过ID号从数据库中读取就可以了吧!为什么图片会出现叉呀?帮忙!谢谢!