สามารถวางบนเซิร์ฟเวอร์เพื่อเรียกดูอัปโหลดและดาวน์โหลดไฟล์บนเซิร์ฟเวอร์และดาวน์โหลดซอร์สโค้ดไฟล์
-
thedir = คำขอ ("thedir")
ifthedir = "" แล้ว
folderini = server.mappath (".") & "/"
อื่น
folderini = server.mappath (thedir) & "/"
endif
foldinfo = trim (request.querystring ("foldinfo")))))))))))))))
iffoldInfo = "" แล้ว
foldinfo = folderini
endif
Classesclsup
dimform, ไฟล์
dimallowext_
dimnoallowext_
privateoupfilestream
privateiserr_
privateerrmessage_
privateisitgetData_
publicpropertygetVersion
เวอร์ชัน = "v1.0.0"
ปลายทาง
publicpropertygetiserr
iserr = iserr_
ปลายทาง
publicpropertygeterrmessage
errMessage = errMessage_
ปลายทาง
publicpropertygetallowext
lewleext = lewleext_
ปลายทาง
PublicPropertyletallowext (ค่า)
allowext_ = lcase (ค่า)
ปลายทาง
publicpropertygetNoallowext
noallowext = noallowext_
ปลายทาง
PublicPropertyletNoallowext (ค่า)
noallowext_ = lcase (ค่า)
ปลายทาง
Privatesubclass_initialize
iserr_ = 0
noallowext = ""
noallowext = lcase (noallowext)
allowext = ""
lewlowext = lcase (allowext)
isgetData_ = เท็จ
enddub
privateSubclass_terminate
Oneerroresumenext
Form.removeAll
setForm = ไม่มีอะไร
file.removeall
setFile = ไม่มีอะไร
oupfilestream.close
setoupfilestream = ไม่มีอะไร
enddub
PublicsubgetData (MaxSize)
Oneerroresumenext
ifisgetData_ = falsethen
dimgetupdata1, sspace, bcrlf, sinfo, iinfostart, iinfoend, tstream, istart, ofileinfo
DimsformValue, sfilename
dimifindStart, ifIndend
dimiformstart, iformend, sformname
ifrequest.totalbytes <1 จากนั้น
iserr_ = 1
errMessage_ = ""
exitsub
endif
ifmaxsize> 0 แล้ว
ifrequest.totalbytes> maxsizethen
iserr_ = 2
errMessage_ = ""
exitsub
endif
endif
setForm = server.createObject ("Scripting.dictionary")
Form.Comparemode = 1
setFile = server.createObject ("Scripting.dictionary")
file.Comparemode = 1
setTSTream = server.createObject ("adodb.stream")
setoupfilestream = server.createObject ("adodb.stream")
oupfilestream.type = 1
oupfilestream.mode = 3
oupfilestream.open
oupfilestream.writequest.binaryread (request.totalbytes)
oupfilestream.position = 0
getUpData1 = oupfilestream.read
iformend = oupfilestream.size
bcrlf = chrb (13) & chrb (10)