<%
función bianli (ruta)
'iniciado
ruta = servidor.mappath (ruta)
establecer fso = server.createObject (scripting.filesystemObject)
Establecer objfolder = fso.getfolder (ruta)
Establecer objfiles = objFolder.files
'把文件名及文件路经存入 THEFILES 数组
int slot = 0
Dim thefiles ()
Redim thefiles (50)
para cada objfile en objfiles
nombre de archivo = objfile.name
FilePath = Split (ObjFile.Path, Docs/)
thepath1 = ./docs/
thepath = thepath1 y filepath (1)
THEFILES (Slot) = FileName & ** & Thepath
ranura = ranura + 1
Si Slot> Ubound (thefiles) entonces
Redim preserva los archivos (ranura+20)
final si
próximo
Redim preserva los archivos (ranura)
'冒泡排序
para i = 0 a Ubound (thefiles) -2
para j = i+1 a Ubound (thefiles) -1
if strcomp (thefiles (i), thefiles (j)) = 1 entonces
tmp = thefiles (i)
thefiles (i) = thefiles (j)
thefiles (j) = tmp
final si
próximo
próximo
'输出
para i = 0 a Ubound (thefiles) -1
para = thefiles (i)
FileName = Split (para, **,-1,1) (0)
FilePath = Split (para, **,-1,1) (1)
%>
<p align = izquierda>
--- <img src = '../../images/arrow_orange.gif' width = '14 'height = '11'>
<a href = '<%= filepath%>'> <span class = activelink_yellow> <%= filename%> </span> </a>
</p>
<%
próximo
función final
%>