<%
功能bianli(路径)
'发起
路径= server.mappath(路径)
设置fso = server.createobject(scripting.filesystemobject)
设置objfolder = fso.getFolder(路径)
设置objfiles = objfolder.files
'把文件名及文件路经存入thefiles数组
int插槽= 0
dim thefiles()
redim thefiles(50)
对于objfiles中的每个objfile
文件名= objfile.name
filepath = split(objfile.path,docs/)
path1 = ./docs/
path = path1&filepath(1)
thefiles(插槽)=文件名&**&path
插槽=插槽 + 1
如果插槽> ubound(thefiles),则
redim保存菲尔斯(插槽+20)
如果结束
下一个
redim保存菲尔斯(插槽)
'冒泡排序
对于i = 0到ubound(thefiles)-2
对于j = i+1到ubound(thefiles)-1
如果strcomp(thefiles(i),thefiles(j))= 1
tmp = thefiles(i)
thefiles(i)= thefiles(j)
thefiles(j)= tmp
如果结束
下一个
下一个
'输出
对于i = 0到ubound(thefiles)-1
para = thefiles(i)
文件名= split(para,**,-1,1)(0)
filepath = split(para,**,-1,1)(1)
%>
<p align =左>
--- <img src ='../../images/arrow_orange.gif'width = '14'height = '11'>
<a href ='<%= filepath%>'> <span class = activelink_yellow> <%= fileName%> </span> </a>
</p>
<%
下一个
结束功能
%>