28,391
社区成员
发帖
与我相关
我的任务
分享
dim rootpath
rootpath=server.mappath(".") 'server.mappath("/")
response.write rootpath
<%
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
%>
<%
sHost = "http://" & Request.ServerVariables("HTTP_HOST") & "/"
sURL = Request.ServerVariables("URL")
sURL = Right(sURL, Len(sURL)-1)
p = InStr(sURL, "/")
If IsNull(p) Or p = 0 Then
sDir = sHost
Else
sDir = sHost & Left(sURL, p)
End If
Response.Write sDir
%>
<%
sHost = "http://" & Request.ServerVariables("HTTP_HOST") & "/"
sURL = Request.ServerVariables("URL")
sURL = Right(sURL, Len(sURL)-1)
p = InStr(sURL, "/")
If IsNull(p) Or p = 0 Then
sDir = sHost
Else
sDir = sHost & Left(sURL, p)
End If
Response.Write sDir
%>