笔记收集
调用方法, <%=ShowFolderList(server.MapPath("manage_admin"))%> <% 'sfo获取文件列表,以下是函数 Function ShowFolderList(folderspec) Dim fso, f, f1, fc, s Set fso = Server.CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.Files s="文件编号"&" 文件链接地址 "&"文件名称<br>" allpath="http://"&request.ServerVariables("HTTP_HOST")&"/"&split(request.ServerVariables("URL"),"/")(1)&"/" counts=1 For Each f1 in fc myname = f1.name s = s &cint(counts)&" "&allpath&myname&" "&myname s = s & " <BR>" counts=counts+1 Next ShowFolderList = s End Function %>