<%
' 다운로드 문자
function downloadfile(fullpath)
downloadfile = false
희미한 strfilename, s, fso, f, intfilelength
set fso = server.createobject("scripting.filesystemobject")
fso.fileexists(fullpath)가 아닌 경우
함수
종료 if
set f = fso.getfile(fullpath)
'获取文件大小
intfilelength = f.size
set s = server.createobject("adodb.stream")
s.open
s.type = 1
s.loadfromfile(fullpath)
응답 .buffer = true
response.clear
'response.addheader "Content-Encoding","GB2312" ' 다양한 설명
'response.addheader "content-type","application/x-msdownload"
response.addheader "content-disposition" ,"attachment;filename=" & f.name
response.addheader "content-length" ,intfilelength
response.contenttype = "application/octet-stream"
s.eos가 아닌 경우
response.binarywrite s.read(1024 * 64)
response.flush
wend
s.close
set s = 없음
downloadfile = true
함수 종료
%>