<%
fungsi bianli (jalur)
'memulai
path = server.mappath (path)
atur fso = server.createObject (scripting.filesystemObject)
atur objolder = fso.getFolder (path)
atur objfiles = objolder.files
'把文件名及文件路经存入 Thefile 数组
slot int = 0
Redup thefiles ()
Redim Thefiles (50)
untuk setiap objfile dalam objfile
nama file = objfile.name
filepath = split (objfile.path, docs/)
thepath1 = ./docs/
ThePath = ThePath1 & Filepath (1)
TheFiles (slot) = nama file & ** & thepath
slot = slot + 1
Jika Slot> Ubound (TheFile) lalu
Redim mengawetkan Thefile (Slot+20)
akhiri jika
Berikutnya
Redim mengawetkan Thefile (Slot)
'冒泡排序
untuk i = 0 ke ubound (thefile) -2
untuk j = i+1 ke ubound (Thefiles) -1
Jika strCComp (Thefiles (i), Thefiles (j)) = 1 maka
TMP = TheFiles (i)
Thefiles (i) = Thefiles (j)
Thefile (j) = TMP
akhiri jika
Berikutnya
Berikutnya
'输出
untuk i = 0 ke ubound (Thefile) -1
Para = TheFiles (i)
FileName = split (para, **,-1,1) (0)
FilePath = split (para, **,-1,1) (1)
%>
<p align = kiri>
--- <img src = '../../gambar/arrow_orane.gif' width = '14 'height = '11'>
<a href = '<%= filepath%>'> <span class = activeLink_yellow> <%= fileName%> </span> </a>
</p>
<%
Berikutnya
fungsi akhir
%>