?? download.asp
字號:
<!--#include file="asp/checkuser.asp"-->
<%
'此程序作用:讓所下載的程序不是以相關聯程序打開,而是下載.如:如果直接給word文檔的地址,
'點擊時,就會在客戶端IE瀏覽器打開該文檔,而不是提供下載
'此程序在是MengXHFileDownLoad組件下工作的.MengXHFileDownLoad為一VB編程組件,現存放
'目錄..asp\MengXHFileDownLoad.dll下,運行時,要用戶注冊.
'但下載的路徑要為服務器的絕對地址
Response.buffer = TRUE
Response.ContentType = "APPLICATION/OCTET-STREAM"
filepath=oabusyuserpath
' filepath=oabusyuserurl
path=request("path")
if right(filepath,1)<>"/" then filepath=filepath & "/"
filename=mid(path,instrrev(path,"/",-1)+1,len(path))
path=filepath&path
' path="f:/wwwroot/meetfile/"&path
'path=mid(path,instrrev(path,"/",-1)+1,len(path))
' path="f:\wroot\e1\upfile\meetword\"&filename
'Response.Write path
Response.AddHeader "Content-Disposition","attachment;filename="&filename
Dim varStream, oMyObject
Set oMyObject = Server.CreateObject("MengXHFileDownLoad.BinReadFromFile")
varStream = oMyObject.readBinFromFile(path)
Response.BinaryWrite(varStream)
Set oMyObject = Nothing
Response.End
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -