ASP使用流输出文件下载
来源:互联网 发布:产品经理必备软件 编辑:程序博客网 时间:2024/05/22 10:51
ASP使用流输出文件下载
' 下载文件
function downloadfile(fullpath)
downloadfile = false
dim strfilename, s, fso, f, intfilelength
set fso = server.createobject("scripting.filesystemobject")
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-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
- ASP使用流输出文件下载
- ASP使用流输出文件下载
- ASP.NET利用输出流生成下载文件(doc、xml..)
- ASP文件下载用流输出的函数
- asp中使用流方式下载文件的代码
- ASP.NET文件下载函数使用
- ASP.NET文件下载函数使用浅析
- ASP.NET文件下载函数使用浅析
- ASP.NET文件下载函数使用浅析
- ASP.NET文件下载函数使用浅析
- 输出文件的下载
- asp.net生成csv文件,并在客户端点击下载(文件流直接输出到客户端而不是先生成保存在服务端再下载)
- struts2 文件流, 文件输出到浏览器 文件下载
- ASP.NET 使用FTP文件上传、下载文件
- 在Asp.net MVC中使用Rdlc输出文件
- 使用输出流读取文件
- 下载文件 asp.net
- ASP.NET文件下载
- 常见木马清除法
- DataGrid技巧大集合(转载)
- 【转载】样式表CSS简明教程
- MSSQL优化之————探索MSSQL执行计划
- 【转载】怎样编写CSS?
- ASP使用流输出文件下载
- PetShop是如何兼容不同数据库的
- 人生感悟——25句心灵鸡汤
- 我的Borland五年——李维 / 文
- 学习资料zz
- 終極解決“Visual Studio .NET 偵測到您的Web伺服器不是ASP .NET 1.1 版,您將無法執行Asp .NET的應用程式或服務。”
- 在java中CreateProcess出现的异常的处理(备忘)
- ASCII码
- .NET三层经典架构PetShop3.0分析连载一