<%
功能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>
<%
下一個
結束功能
%>