ASP读取任意文件二进制输出/下载:

<%
i=0 '计数器
r=1024 '每次读取大小

With Server.CreateObject("Adodb.Stream")
.Mode=3
.Type=1
.Open
.LoadFromFile(Server.MapPath("test.wma"))

While i<.Size
Response.BinaryWrite .Read(r)
Response.Flush
i=i+r
Wend

.Close
End With
%>