7 个解决方案
#1
用vbscript里面的FileSystemObject对象。以下是段实例程序:
Function ShowFileList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
s = s & f1.name
s = s & "<BR>"
Next
ShowFileList = s
End Function
Function ShowFileList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
s = s & f1.name
s = s & "<BR>"
Next
ShowFileList = s
End Function
#2
<%
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath("."))
Set files = f.Files
For Each file in files
%>
<a href="<%= file.Name %>"><%= file.Name %></a><br>
<%
Next
%>
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath("."))
Set files = f.Files
For Each file in files
%>
<a href="<%= file.Name %>"><%= file.Name %></a><br>
<%
Next
%>
#3
<HTML>
<HEAD><TITLE>文件夹内容</TITLE></HEAD>
<BODY>
<%
'创建一个FileSystemObject对象的事例
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("e:\winnt")
'循环显示其中文件
For Each thing in MyFolder.Files
Response.Write("<p>"&thing)
Next
%>
</Body>
</HTML>
<HEAD><TITLE>文件夹内容</TITLE></HEAD>
<BODY>
<%
'创建一个FileSystemObject对象的事例
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("e:\winnt")
'循环显示其中文件
For Each thing in MyFolder.Files
Response.Write("<p>"&thing)
Next
%>
</Body>
</HTML>
#4
谢谢,我知道了!!
#5
我来晚了,蹭不到分了。
#6
服务商把FSO关了,怎么办呢?
有没有其他的办法?
有没有其他的办法?
#1
用vbscript里面的FileSystemObject对象。以下是段实例程序:
Function ShowFileList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
s = s & f1.name
s = s & "<BR>"
Next
ShowFileList = s
End Function
Function ShowFileList(folderspec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
s = s & f1.name
s = s & "<BR>"
Next
ShowFileList = s
End Function
#2
<%
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath("."))
Set files = f.Files
For Each file in files
%>
<a href="<%= file.Name %>"><%= file.Name %></a><br>
<%
Next
%>
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath("."))
Set files = f.Files
For Each file in files
%>
<a href="<%= file.Name %>"><%= file.Name %></a><br>
<%
Next
%>
#3
<HTML>
<HEAD><TITLE>文件夹内容</TITLE></HEAD>
<BODY>
<%
'创建一个FileSystemObject对象的事例
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("e:\winnt")
'循环显示其中文件
For Each thing in MyFolder.Files
Response.Write("<p>"&thing)
Next
%>
</Body>
</HTML>
<HEAD><TITLE>文件夹内容</TITLE></HEAD>
<BODY>
<%
'创建一个FileSystemObject对象的事例
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("e:\winnt")
'循环显示其中文件
For Each thing in MyFolder.Files
Response.Write("<p>"&thing)
Next
%>
</Body>
</HTML>
#4
谢谢,我知道了!!
#5
我来晚了,蹭不到分了。
#6
服务商把FSO关了,怎么办呢?
有没有其他的办法?
有没有其他的办法?