<%@ language="Javascript" %>
<%
Response.AddHeader("content-disposition","attachment; filename=因为.mp3");
if(Session("asfman"))
{
var BinaryStream = new ActiveXObject("ADODB.Stream");
BinaryStream.Type = 1;
BinaryStream.Open()
BinaryStream.LoadFromFile(Server.mappath("test.mp3"));
while(!BinaryStream.eos){
Response.BinaryWrite(BinaryStream.Read(1024*64));
}
BinaryStream.Close();
BinaryStream = null;
Response.End();
}else
{
Response.Write(Session("asfman")+"---"+(typeof Session("asfman")));
}
%>
////、、、、、
<%@ language="Javascript" %>
<%
//Response.buffer = true;
Response.AddHeader("content-disposition","attachment; filename=test.jpg");
var BinaryStream = new ActiveXObject("ADODB.Stream");
BinaryStream.Type = 1;
BinaryStream.Open()
BinaryStream.LoadFromFile(Server.mappath("test.jpg"));
while(!BinaryStream.eos){
Response.BinaryWrite(BinaryStream.Read(1024*64));
}
BinaryStream.Close();
BinaryStream = null;
Response.End();
%>
posted on 2008-08-22 19:23
汪杰 阅读(419)
评论(0) 编辑 收藏 引用 所属分类:
asp(javascrpt)