<%
onerrorresumenext
DIMR
setr = newrar
r.addserver.mappath ( "a.gif")
r.addserver.mappath ( "a.txt")
r.addserver.mappath ( "테스트")
r.addserver.mappath ( "file.asp")
r.packname = server.mappath ( "xxx.dat")
R.pack
r.rootpath = server.mappath ( "xxx")
r.packname = server.mappath ( "xxx.dat")
R.unpack
response.write (err.description)
setr = 아무것도
%>
<scriptLanguage = "vbscript"runat = "Server">
'-----------------------------------------------------------------
'설명 : ASP 포장 클래스
'저자 : XiaoHui ([email protected])
'링크 : http : //asp2004.nethttp : //blog.csdn.net/iuhxqhttp : //bbs.asp2004.net
'버전 : 1.0beta
'저작권 :이 작업은 무료로 사용할 수 있지만 저작권 정보를 제거하지 마십시오.
'-----------------------------------------------------------------
클래스 라
Dimfiles, PackName, S, S1, S2, RootPath, FSO, F, Buf
privatesubclass_initialize
무작위 화
Dimrannum
rannum = int (90000*rnd) +10000
PackName = Year (now) & month (now) & day (now) & hour (지금) & minute (now) & second (now) & rannum & ". ASP2004"
rootpath = server.mappath ( "./")
setfiles = server.createobject ( "scripting.dictionary")
setfso = server.createobject ( "scripting.filesystemobject")
sets = server.createobject ( "adodb.stream") : s.open:s.type=1
sets1 = server.createobject ( "adodb.stream") : s1.open:s1.type=1
sets2 = server.createobject ( "adodb.stream") : s2.open:s2.type=2
Endsub
privatesubclass_terminate
s.close : sets = 아무것도
S1.Close : sets1 = 아무것도
s2.close : sets2 = 아무것도 없습니다
setfso = 아무것도
Endsub
PublicSubadd (OBJ)
그런 다음 ifffso.fileExists (obj)
setf = fso.getfile (obj)
files.addobj, f.size
elseifso.dolerexists (obj)
files.addobj, -1
setf = fso.getfolder (obj)
setfc = f.files
foreachf1infc
추가 (lcase (f1.path))
다음
endif
Endsub
대중 서적
딤스트
a = files.keys
b = files.ITEMS
fori = 0tofiles.count-1
ifb (i)> = 0then
S.loadfromfile (a (i))
buf = s.read
ifnotisnull (buf) Thens1.write (buf)
endif