[code]
"0" cellpadding="0" width="100%" align="center" bordercolor="#000000" border="1">
"#33cccc">
文件 |
創(chuàng)建日期 |
<%
foldpath=server.mappath("../images/uploadfiles")
set fso = server.createobject("scripting.filesystemobject")
set fsofolder=fso.getfolder(foldpath)
set getfiles =fsofolder.files
'定義數(shù)組
dim filearr(),i
i=0
for each f in getfiles
redim preserve filearr(i)
temp=f.datecreated'取出文件建立時(shí)間
filearr(i)=temp
i=i+1
next
'對(duì)文件建立時(shí)間排序
for m=0 to i-1
for n=m to i-1
if(cdate(filearr(m))<cdate(filearr(n)))then
ordertemp=filearr(m)
filearr(m)=filearr(n)
filearr(n)=ordertemp
end if
next
next
for m=0 to i-1
for each f in getfiles
temp=f.datecreated
if(cdate(temp)=cdate(filearr(m)))then
%>
<% file_name=f.name response.write file_name %> |
<%=f.datecreated%> |
<%
end if
next
next
%>
[/code]
該文章在 2010/7/16 15:49:51 編輯過(guò)