程序代碼:
<%
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP") '創建對象
xml.Open "GET","http://www.4guysfromrolla.com/webtech/code/mitchell-pres.zip",False ' '設置對象,具體xmlhttp詳細使用方法請見:http://www.cnsxml.com/blogview.asp?logID=273 《XMLHTTP 對象及其方法》一文
xml.Send '發送請求
Response.AddHeader "Content-Disposition", "attachment;filename=mitchell-pres.zip" '添加頭給這個文件
Response.ContentType = "application/zip" '設置輸出類型
Response.BinaryWrite xml.responseBody ’輸出二進制到浏覽器
Set xml = Nothing
%>
----------------------------------------------
歐陽東傑 創作 (轉載請保留此信息)
www.cnsxml.com
QQ:2596812 MSN:[email protected]
----------------------------------------------
出處:CSDN