在IE进行文档链接时,如果遇到OLE支持的文档,IE会自动调用相应程序打开它,有时候这种功能并不是我们所需的,虽然我们可以提醒用户用鼠标右键--"目标另存为...."命令来下载文档,但这样毕竟不太友好,本文描述了利用FSO及Stream方法实现IE直接下载文档.
<%@ language=vbscript codepage=65001%
<% 
'Filename must be input
if Request("Filename")="" then
 response.write "
call  downloadFile(replace(replace(Request("Filename"),"\",""),"/",""))    
 
Function  downloadFile(strFile)    
'  make  sure  you  are  on  the  latest  MDAC  version  for  this  to  work    
'  get  full  path  of  ...[ 查看全文 ]