国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

ASP使用流輸出文件下載

2019-11-17 04:12:24
字體:
來源:轉載
供稿:網友

<%
' 下載文件
function downloadfile(fullpath)

downloadfile = false

dim strfilename, s, fso, f, intfilelength

set fso = server.createobject("scr

if not fso.fileexists(fullpath) then


exit function

end if

set f = fso.getfile(fullpath)

'獲取文件大小

intfilelength = f.size

set s = server.createobject("adodb.stream")

s.open

s.type = 1

s.loadfromfile(fullpath)

response.buffer = true

response.clear

'response.addheader "Content-Encoding","GB2312" ' 亂碼的解決方案

'response.addheader "content-type","application/x-msdownload"

response.addheader "content-disposition","attachment;filename=" & f.name

response.addheader "content-length" ,intfilelength

response.contenttype = "application/octet-stream"

while not s.eos


response.binarywrite s.read(1024 * 64)


response.flush

wend

s.close

set s = nothing

downloadfile = true
end function
%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 青海省| 霞浦县| 于都县| 彭水| 若尔盖县| 宜宾市| 基隆市| 中超| 霍邱县| 澄城县| 祁阳县| 巴彦县| 改则县| 鄂尔多斯市| 潍坊市| 龙里县| 佛山市| 巢湖市| 新宾| 青州市| 龙井市| 青河县| 上饶县| 万山特区| 南宫市| 仙游县| 潞西市| 承德县| 靖宇县| 光山县| 郧西县| 大余县| 时尚| 辉南县| 屏山县| 富川| 上犹县| 龙陵县| 嵊州市| 荣成市| 资阳市|