关于 隐藏下载地址问题?
我用连接文件 down.asp?MOVid=<%rs("MOVid")%>&Serverid=<%rs("Serverid")%>为什么浏览器出现了:http://192.168.0.1:3333/progid=D:/xbsmov/网站目录/1.MP3
上面的地址怎么让浏览器显示:down.asp?MOVid=1&Serverid=1
down.asp
-------------------------------------------
<%
if(request.querystring("MOVid")<>"") Then
Serverid=request.querystring("movServerid")
fromid=request.querystring("MOVid")
else
AX"禁止下载"
response.end
end If
'----------------服务器IP和端口---------------------------
sqlx="select * from [movSer] where movSerID="&Serverid&""
set rsx=server.createobject("adodb.recordset")
rsx.open sqlx,conn,1,1
SerIP=RSx("movSerIP") '服务器IP
SerPort=RSx("movSerPort") '端口
rsx.close
set rsx=Nothing
'---------------------------------------------------
sql="select * from [movlist] where movid="&fromid&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
myurl="http://"&SerIP&":"&SerPort&"/progid="&Replace(rs("filepath")," ","%20")& Chr(13) & Chr(10) ' rs("filepath") 显示格式为:D:/xbsmov/网站目录/1.MP3
title=rs("filename") '文件名
sql="UPDATE [movUser] SET axuser=axuser-1 where Username='" &Request.Cookies("login")& "'"
conn.execute(sql)
if lcase(left(myurl,7))="http://" or lcase(left(myurl,6))="ftp://" then
response.redirect myurl
else
Response.Clear
Response.ContentType="application/ms-download"
Response.AddHeader "content-disposition","attachment;filename=["&title&"]"&Mid(myurl,InStrRev(myurl,"."))&""
Set Stream=server.CreateObject("ADODB.Stream")
Stream.Type=1
Stream.Open
Stream.LoadFromFile Server.MapPath(""&myurl&"")
While Not Stream.EOS
Response.BinaryWrite Stream.Read(1024*64)
Wend
Stream.Close
Set Stream = Nothing
Response.Flush
Response.End
end if
rs.close
set rs=nothing
rs.close
set rs=nothing
%>