vithink小文件自动实现文件浏览下载   " S = S & "" S = S & "" GenerateFileInformation = S End Function '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' 函数名称:GenerateFolderInformation() ' 功能说明:描述文件夹的当前状态 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function GenerateFolderInformation(Folder,i) Dim S, RowColor RowColor = "" If i Mod 2 = 0 Then RowColor = "bgcolor=#dddddd" S = "" GenerateFolderInformation = S End Function %>
<% Set FSO = CreateObject("Scripting.FileSystemObject") hu = Replace(Server.MapPath("index.asp"),"index.asp","") '本系统所在目录 Set TestFolder = FSO.GetFolder(hu) GenerateTestInformation = GenerateAllFolderInformation(TestFolder) Function GenerateAllFolderInformation(Folder) Dim S, SubFolders, SubFolder, Files, File, i tmpStr = "" Set SubFolders = Folder.SubFolders If SubFolders.Count <> 0 Then i = 1 For Each SubFolder In SubFolders i = i + 1 tmpStr = tmpStr & GenerateFolderInformation(SubFolder,i) Next End If Response.Write tmpStr & "

" tmpStr = "" Set Files = Folder.Files tmpStr = tmpStr & "" tmpStr = tmpStr & "" If Not (Folder.IsRootFolder) Then tmpStr = tmpStr & "" End If tmpStr = tmpStr & "" tmpStr = tmpStr & "" If Files.Count <> 0 Then i = 1 For Each File In Files i = i + 1 tmpStr = tmpStr & GenerateFileInformation(File,i) Next End If Response.Write tmpStr & "
" End Function Function UrlEnCode(Path) UrlEnCode = Replace(Server.URLEncode(Path),"\","/") End Function Function CloseFSO FSO.Close Set FSO = Nothing End Function Function GenerateFileInformation(File,i) Dim S, RowColor RowColor = "" If i Mod 2 = 0 Then RowColor = "bgcolor=#9999dd" If i Mod 2 <> 0 Then RowColor = "bgcolor=#aaaaee" S = "
" & File.Name & "" & FormatNumber(File.Size/1024 ,0) & " KB" S = S & "