|
虚拟主机评测网文章 → ASP技术 → ASP技巧 → 浏览: 实现文件下载而不是由ie打开的代码
|
| 实现文件下载而不是由ie打开的代码 |
| 作者: 发表时间:2003年8月7日 阅读次数() |
<% Const ForReading=1 Const TristateTrue=-1 'Unicode Const FILE_TRANSFER_SIZE=16384 '16k 'Use the following line for IIS4/PWS - this is the default for IIS5 Function TransferFile(path, mimeType, filename) Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") Response.AddHeader "content-type", mimeType Do While Not objStream.AtEndOfStream Response.Flush objStream.Close Dim path, mimeType, sucess |
| 来源: 计算机开发者俱乐部 |
|
本系统由虚拟主机评测网制作维护 E-mail:xianweixie@gmail.com OICQ:7834843 Copyright © 2003-2004 All Rights Reserved |