海外邮件中继,海外退信中继,美国高速VPS,不限流量VPN,邮局维护和管理,邮件网关,EMOS邮件中继,POSTFIX邮件中继,Winwebmail邮件中继,Winmail邮件中继,DBMail邮件中继,JDMail邮件中继,Exchange邮件中继,MDaemon邮件中继 淘宝店:http://shantan.taobao.com 云邮科技官网:www.yunrelay.com
【字体设置:大 中 小】
<%
driver_name1="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:\数据库\TREE.MDB" '根目录下数据库打开语句
dim search,rs,j
search="select * from Files where ID=" & request.querystring("ID")
set my_conn=server.CreateObject ("adodb.connection")
my_conn.open driver_name1
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open search,my_conn,1,3
if rs.bof or rs.eof then
response.write "错误:找不到该文件"
response.end
end if
'设置文件的大小及MIME类型
Function SetForDisplay(field, contentType)
contentType = LCase(trim(contentType))
nFieldSize = field.ActualSize
bytes = field.GetChunk(nFieldSize)
Session("Bytes") = bytes
Session("Type") = contentType
End Function
SetForDisplay RS("File"),rs("FileType")
'Response.AddHeader "Content-Disposition", "attachment; filename=" & rs("FileName")
response.contentType = Session("Type")
response.BinaryWrite Session("Bytes")
Session("Type") = ""
Session("Bytes") = ""
set rs=nothing
my_conn.close
set my_conn=nothing
%>
发表评论 - 不要忘了输入验证码哦!