<%
'ASP读取图片文件函数
Function ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
End Function
if Request.ServerVariables("HTTP_REFERER")<>"" Then
Response.ContentType="image/jpeg"
'ASP里显示图片在网页上要用
Response.BinaryWrite ReadBinaryFile("1.jpg")
Else
'跳转URL地址
Response.Redirect("http://hi.baidu.com/flyabout")
End IF
%>