最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

文件遍歷排序函數(shù)

 更新時間:2006年10月28日 00:00:00   作者:  
<%

function bianli(path)

'initiate
path = server.mappath(path)
set fso=server.CreateObject("scripting.filesystemobject")
set objFolder=fso.GetFolder(path)
set objfiles = objfolder.files

'把文件名及文件路經(jīng)存入theFiles數(shù)組
int slot = 0
Dim theFiles()
redim theFiles(50)
for each objFile in objFiles
filename = objFile.name
filePath = split(objFile.path,"docs\")
thepath1 = "./docs/"
thepath = thepath1 & filepath(1)
theFiles(slot) = filename&"**"&thepath
slot = slot + 1
if slot > UBound(theFiles) then
ReDim Preserve theFiles(Slot+20)
end if
next
ReDim Preserve theFiles(slot)


'冒泡排序
for i = 0 to UBound(theFiles)-2
for j = i+1 to UBound(theFiles)-1
if strComp(theFiles(i),theFiles(j)) = 1 then
tmp = theFiles(i)
theFiles(i) = theFiles(j)
theFiles(j) = tmp
end if
next
next

'輸出
for i = 0 to UBound(theFiles)-1
para = theFiles(i)
filename = split(para,"**",-1,1)(0)
filepath = split(para,"**",-1,1)(1)
%>
<p align = "left">
---<img src='../../images/arrow_orange.gif' width='14' height='11'>
<a href='<%=filepath%>'><span class="activelink_yellow"><%=filename%></span></a>
</p>
<%
next
end function
%>

相關(guān)文章

最新評論

永顺县| 浦东新区| 惠来县| 阜宁县| 内江市| 沙坪坝区| 乐至县| 简阳市| 宜州市| 台前县| 武夷山市| 安达市| 疏附县| 遵义市| 固始县| 鹰潭市| 东乌珠穆沁旗| 洛浦县| 保靖县| 宣恩县| 通河县| 无极县| 广东省| 宣武区| 肃南| 合川市| 东海县| 绥江县| 商丘市| 卢龙县| 临清市| 喀什市| 玉环县| 合山市| 遵化市| 东山县| 临夏县| 辽宁省| 台前县| 西贡区| 河曲县|