主頁(yè) > 知識(shí)庫(kù) > vithink小文件自動(dòng)實(shí)現(xiàn)文件瀏覽下載

vithink小文件自動(dòng)實(shí)現(xiàn)文件瀏覽下載

熱門標(biāo)簽:電子圍欄 Mysql連接數(shù)設(shè)置 阿里云 服務(wù)器配置 團(tuán)購(gòu)網(wǎng)站 科大訊飛語(yǔ)音識(shí)別系統(tǒng) 銀行業(yè)務(wù) Linux服務(wù)器
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","") '本系統(tǒng)所在目錄



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
i = i + 1
tmpStr = tmpStr GenerateFileInformation(File,i)
Next
End If

Response.Write tmpStr "/table>"

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 = "tr>td "RowColor" > " File.Name "/td>"
S = S "td "RowColor">" FormatNumber(File.Size/1024 ,0) " KB/td>"

S = S "td align=center "RowColor">"

S = S "a href='" File.Name "' > ↓/a>/td>/tr>"

GenerateFileInformation = S

End Function

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 函數(shù)名稱:GenerateFolderInformation()
' 功能說明:描述文件夾的當(dāng)前狀態(tài)

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function GenerateFolderInformation(Folder,i)

Dim S, RowColor

RowColor = ""
If i Mod 2 = 0 Then RowColor = "bgcolor=#dddddd"


S = ""


GenerateFolderInformation = S

End Function

%>
/td>
/tr>
/table>
/td>
/tr>
/table>
script src=http://www.mithink.com/js/bottom1.js>/script>

/body>

/html>

標(biāo)簽:廣元 棗莊 大理 江蘇 萍鄉(xiāng) 衡水 蚌埠 衢州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《vithink小文件自動(dòng)實(shí)現(xiàn)文件瀏覽下載》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266