程序代码:
<%
Response.Buffer=True
DimobjXMLHTTP,xml
Setxml=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.BinaryWritexml.responseBody’输出二进制到浏览器
Setxml=Nothing
%>
最新评论