无标题文档

南海涌春潮,培才掀巨浪

作者:   摄影:   发布人:   来源:   发布日期:2009-04-21   点击量:14217   手机模式
<% ' '强制浏览器重新访问服务器下载页面,而不是从缓存读取页面 Response.Buffer = True Response.Expires = -1 Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0 Response.CacheControl = "no-cache" Dim DownloadUrl, FileExt 'DownloadUrl = PE_Soft.GetDownloadUrl() 'DownloadUrl = request("fname") DownloadUrl = "\movies\kaifangri\kfr01.wmv" If DownloadUrl = "ErrorDownloadUrl" Then Response.End Set PE_Soft = Nothing FileExt = LCase(Mid(DownloadUrl, InStrRev(DownloadUrl, ".") + 1)) 'If InStr(DownloadUrl, "://") <= 0 Then ' DownloadUrl = "http://" & Trim(Request.ServerVariables("HTTP_HOST")) & DownloadUrl 'End If Select Case FileExt Case "wmv", "mpg", "asf", "mp3", "mpeg", "avi" ShowMediaPlayer (DownloadUrl) Case "rm", "ra", "ram" ShowRealPlayer (DownloadUrl) Case Else '方法一可以解决下载地址中的中文名在另存为对框中的乱码问题,但只能直接点击下载 'Response.write "" '方法二可以使用“目标另存为”,但会有中文乱码问题 Response.Redirect DownloadUrl End Select 'strUrl="\movies\kaifangri\kfr01.wmv" Function ShowMediaPlayer(strUrl) %>

<% End Function Function ShowRealPlayer(strUrl) %>

<% End Function %>
 无标题文档