我的论坛用了asp防盗链...大家还是先看下这个防盗链的源码吧: <% From_url = Cstr(Request.ServerVariables("HTTP_REFERER")) Serv_url = Cstr(Request.ServerVariables("SERVER_NAME")) if mid(From_url,8,len(Serv_url)) <> Serv_url then response.write "非法链接!" '防止盗链 response.end end if Function GetFileName(longname)'/folder1/folder2/file.asp=>file.asp while instr(longname,"/") longname = right(longname,len(longname)-1) wend GetFileName = longname End Function Dim Stream Dim Contents Dim FileName Dim TrueFileName Dim FileExt Const adTypeBinary = 1 FileName = Request.QueryString("FileName") if FileName = "" Then Response.Write "无效文件名!" Response.End End if FileExt = Mid(FileName, InStrRev(FileName, ".") + 1) Select Case UCase(FileExt) Case "ASP", "ASA", "ASPX", "ASAX", "MDB" Response.Write "非法操作!" Response.End End Select Response.Clear if lcase(right(FileName,3))="gif" or lcase(right(FileName,3))="jpg" or lcase(right(FileName,3))="png" then Response.ContentType = "image/*" '对图像文件不出现下载对话框 else Response.ContentType = "application/ms-download" end if Response.AddHeader "content-disposition", "attachment; filename=" & GetFileName(Request.QueryString("FileName")) Set Stream = server.CreateObject("ADODB.Stream") Stream.Type = adTypeBinary Stream.Open if lcase(right(FileName,2))="rm" then '设置rm类型文件目录 TrueFileName = "/kang/"&FileName end if if lcase(right(FileName,3))="wmv" then '设置wmv类型文件目录 TrueFileName = "/kangkang/"&FileName end if if lcase(right(FileName,3))="gif" or lcase(right(FileName,3))="jpg" or lcase(right(FileName,3))="png" then TrueFileName = "/kang/2005-9/"&FileName '设置图像文件目录 end if Stream.LoadFromFile Server.MapPath(TrueFileName) While Not Stream.EOS Response.BinaryWrite Stream.Read(1024 * 64) Wend Stream.Close Set Stream = Nothing Response.Flush Response.End %> 大家注意,现在我用这个防盗链在论坛里插入一张图片: www.51755.com/ceshi.asp?filename=1.jpg 这张图片可以正常显示在论坛里 下面再插入个影音文件在线播放的: [rm]www.51755.com/ceshi.asp?filename=intro.rm[/rm]问题出现了.这个影音文件不能播放.播放器提示需要附加组件才能播放文件.然后就是找不到组件,不能播放此文件!但我用这个地址提供下载一切正常,我实在郁闷,为什么可以下载,而不能在线播放呢,问题出在那里,小弟拜跪求解! (注:以上网址并非有效路径,只是让大家明白我说的意思)