两种方法。 1、下载ppt 2、fso实现下载 <% 'strFile 可以是文件的相对路径,也可以是绝对路径。 strFile="***.ppt" downloadFile(strFile) %> <% Function downloadFile(strFile) strFilename = server.MapPath(strFile) Response.Buffer = True Response.Clear Set s = Server.CreateObject("ADODB.Stream") s.Open s.Type = 1 on error resume next Set fso = Server.CreateObject("Scripting.FileSystemObject") if not fso.FileExists(strFilename) then response.Write "" Response.End end if Set f = fso.GetFile(strFilename) intFilelength = f.size s.LoadFromFile(strFilename) if err then Response.Write("
") Response.End end if Response.AddHeader "Content-Disposition", "attachment; filename=" &f.name Response.AddHeader "Content-Length", intFilelength Response.CharSet = "UTF-8" Response.ContentType = "application/octet-stream" Response.BinaryWrite s.Read Response.Flush s.Close Set s = Nothing End Function %>