成都市中联无限科技有限公司
 

中联无限:成都网站建设、成都网站设计、成都网站制作
建站热线:028-86637122 工作时间:9:00-18:00 星期一-星期六

 设为首页   加入收藏    
 
首页 | 关于我们 | 新闻动态 | 业务体系 | 域名注册 | 虚拟主机 | 网站建设 | 网页设计案例 | 网站推广 | 网站知识 | 常见问题
  基础业务
  
  我们做什么
  网站建设·网页设计 (
  网站策划·网站推广 (
  雅虎口碑壹推广 (ko
  谷歌搜索竞价 (Goo
  网站评估诊断 (Goo
  全站动画·创意设计 (
  域名 (各类中、英文域
 
   您的位置在:首页 > 中联无限科技有限公司 > 基础业务
   基础业务
ASP使用流输出文件下载
[ 来源:中联无限科技有限公司   发布日期:2010-03-26 16:08:39 ]
收藏到: Del.icio.us Google书签 Digg Live Bookmark Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

<%
' 下载文件
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-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
%>

首页 | 公司简介 |联系方式 |付款方式 |人才招聘 | 域名空间 | 网页设计案例 | 网站知识 | 解决方案 | 建站指南
地址:成都市西大街1号新城市广场D1座28楼   邮编:610019   E- Mail:cdcc@cc01.com.cn   在线Q Q:点击发送消息给对方 点击发送消息给对方 
业务咨询:028-86637122  66783508  13084426530  传真:028-86637122   代理合作 :028-66783508
公交线路:4、7、37、56、62、109 路到八宝街站下车   点此查看百度地图
中联无限科技有限公司 2004-2010
蜀ICP备05006755号川B2--20060066