指引网

当前位置: 主页 > 编程开发 > ASP >

vithink小文件自动实现文件浏览下载

来源:网络 作者:佚名 点击: 时间:2017-06-22 20:46
[摘要] html head meta http-equiv=Content-Type content=text/html; charset=gb2312 /head body script src=http://www.mithink.com/js/top.js/script table id=table16 cellSpacing=0 cellPadding=0 width=765 border=0 tr td vAlign=bottom align=middle colSpan=
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
 <script src=http://www.mithink.com/js/top.js></script>
<table id="table16" cellSpacing="0" cellPadding="0" width="765" border="0">
<tr>
<td vAlign="bottom" align="middle" colSpan="2">
<table id="table21" cellSpacing="0" cellPadding="0" width="765" align="center" border="0">
<tr>
<td ><%
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 & "</table><br>"
tmpStr = ""
Set Files = Folder.Files
tmpStr = tmpStr & "<table border=0 width=100% cellspacing=1 cellpadding=4 align='left' style='word-break: break-all'>"
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
------分隔线----------------------------