<%@ Language=VBScript %>
<HTML>
<HEAD>
<META name=VI60_DTCScriptingPlatform content="Server (ASP)">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT LANGUAGE=vbscript>
<!--
Sub button1_onclick
str="c:\"
str=Server.mapPath("http://clz/1_local/")
ShowFileList(str)
End Sub
Sub ShowFileList(folderspec)
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
s = s&f1.name
s = s&vbCrLf
Next
MsgBox s
End Sub
-->
</SCRIPT>
我用str="c:\"是对的,但我是想显示服务器上的文件
用str=Server.mapPath("http://clz/1_local/")就会缺少对象server
到底哪错呀
str=Server.mapPath("/clz/1_local/")
不要出现http字样。
不懂~~~
帮你顶~~`
不是吧,你这是客户端 代码耶!!
请用在服务器端..
是啊server对象只能在服务器上用