变态重口极致另类在线-波多久久夜色精品国产-波多野结衣在线观看一区-波多野结衣在线观看一区二区-污污的网站免费阅读-污污视频网址

當(dāng)前位置:首頁文章首頁 IT學(xué)院 IT技術(shù)

教你通過ASP下載文件(源碼)

作者:  來源:  發(fā)布時(shí)間:2011-6-3 16:46:43  點(diǎn)擊:
本文介紹的是通過ASP下載文件(源碼)的實(shí)例,希望對大家有所幫助。
Sometimes you want a user to download a binary file instead of opening it inside the browser window.
There are several different ways to accomplish this.
Generically:
<%
FileName = "Document.Doc"
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename =" & filename
Set Stream = Server.CreateObject("ADODB.Stream")
Stream.Open
Stream.LoadFromFile Server.MapPath(Filename)
Conents = Stream.ReadText
Response.BinaryWrite Contents
Stream.Close
Set Stream = Nothing
%>

If you know the file type that you would like the user to download, try:
<%
Filename = "document.doc"
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader "content-disposition", "attachment; filename=" & filename
%>
Other Content Types:
vnd.ms-excel - For Excel
vnd.ms-powerpoint - For PowerPoint
vnd.ms-project - For Microsoft Project
pdf - For Adobe Acrobat Documents
rtf - For Rick Text Documents
vnd.lotus-wordpro - For WordPro
vnd.lotus-1-2-3 - For Lotus 1-2-3
vnd.visio - For Visio
jpeg - for JPG Image File
gif - for GIF Image File
png - for PNG Image File

相關(guān)軟件

相關(guān)文章

文章評論

軟件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
主站蜘蛛池模板: 一级黄色在线视频 | 日韩福利影视 | 老湿影院福利 | 在线观看日本亚洲一区 | 午夜官网| 青青青在线视频播放 | 无遮羞无删减肉动漫在线观看 | 国产偷国产偷亚洲高清在线 | 14一15sexvideo日本| 一级片免费在线观看 | 久久久久国产视频 | 天堂成人在线视频 | 午夜视频一区二区三区 | 岛国毛片在线观看 | 日韩伦理片在线播放 | 欧美97人人模人人爽 | 久国产精品视频 | 91视频入口 | 国产小视频在线高清播放 | 成人黄色片网站 | xxxxx日本| 欧美在线一区二区三区不卡 | 国产第一福利 | 日韩综合nv一区二区在线观看 | 日韩欧美 在线播放 | www免费| 欧美日韩综合高清一区二区 | 国产一级毛片夜一级毛片 | 最新男同志freevideos | 中文字幕亚洲综合久久202 | 成人网在线视频 | 激性欧美在线播激性欧美 | 亚洲国产精品网 | 日本欧美日韩 | 中文字幕 亚洲一区 | 日韩美三级 | 日本成人一级 | 成人激情黄色 | 在线看一级片 | 99久久精品国产一区二区 | 成年视频免费 |