Его можно размещать на сервере для просмотра, загрузки и загрузки файлов на сервере и загрузить исходный код файла.
Просто поместите все следующие коды в один файл, и суффикс файла должен быть ASP.
<%
thedir = запрос ("thedir")
ifthedir = "" Затем
fotherini = server.mappath (".") & "/"
еще
fotherini = server.mappath (thedir) & "/"
эндиф
foldinfo = trim (request.querystring ("foldinfo"))))
iffoldInfo = "" Тогда
foldInfo = folderini
эндиф
ClassESCLSUP
Dimform, файл
DiMalloext_
DimnoAllowext_
PretyoupfileStream
Privateiserr_
Privateerrmessage_
PretityisgetData_
Publicpropertygetversion
Версия = "v1.0.0"
EndProperty
Publicpropertygetiserr
iserr = iserr_
EndProperty
Publicpropertygeterrmessage
Errmessage = errmessage_
EndProperty
PublicpropertygetAllowext
AllingExt = AllingExt_
EndProperty
Publicpropertyletallowext (значение)
AllingExt_ = lcase (значение)
EndProperty
Publicpropertygetnoallowext
Noallowext = noallowext_
EndProperty
PublicpropertyletnoAllowext (значение)
Noallowext_ = lcase (значение)
EndProperty
Privatesubclass_initialize
iserr_ = 0
Noallyxtxt = ""
Nowallyxt = lcase (noallowext)
AllingExt = ""
AllingExt = lcase (AllingExt)
isgetData_ = false
Заканчивая
PrivateBclass_terminate
OneEerrorResumenext
Форма.Ремовелл
SetForm = ничего
File.removeall
SetFile = ничего
oupfileStream.close
SetoupfileStream = ничего
Заканчивая
Publicsubgetdata (maxsize)
OneEerrorResumenext
ifisgetdata_ = falsethen
Dimgetupdata1, Sspace, Bcrlf, Sinfo, iinfostart, iinfoend, tstream, iStart, Ofileinfo
DimSformValue, SfilEname
DiMifindStart, ifindend
Dimiformstart, iformend, sformname
Ifrequest.totalbytes <1then
iserr_ = 1
Errmessage_ = ""
Exitsub
Эндиф
Ifmaxsize> 0then
Ifrequest.totalbytes> maxsizethen
iserr_ = 2
Errmessage_ = ""
Exitsub
Эндиф
Эндиф
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.writeRequest.binaryRead (request.totalbytes)
oupfileStream.position = 0
getupdata1 = oupfileStream.read
iformend = oupfileStream.size
bcrlf = chrb (13) и chrb (10)