请问这段代码怎么写?(急用)
版主我把您说的路径给改成相对路径了但还是有问题您看看这样改对吗?
<%Dim fso,f, f1, fc, s,fpath
Dim tempCurrentPath,CurrentPath,DirectoryRoot
DirectoryRoot=Trim(Request("DirectoryRoot"))
if DirectoryRoot="" or DirectoryRoot="/" then
DirectoryRoot = "/"
else
if right(DirectoryRoot,1)<>"/" then
DirectoryRoot = DirectoryRoot&"/"
end if
end if
qlj=trim(request("qlj"))
fjx="DirectoryRoot="&DirectoryRoot&"&qlj="&qlj
tempCurrentPath=FilterPath(Trim(Request("CurrentPath"))) ‘19行
If tempCurrentPath<>"" Then
if instrrev(tempCurrentPath,"/")=0 then
ParentFolder=""
else
ParentFolder=left(tempCurrentPath,instrrev(tempCurrentPath,"/")-1)
end if
Else
ParentFolder=tempCurrentPath
End If
if tempCurrentPath<>"" and left(tempCurrentPath,1)="/" then
tempCurrentPath = mid(tempCurrentPath,2)
end if
if tempCurrentPath<>"" and right(tempCurrentPath,1)<>"/" then
tempCurrentPath = tempCurrentPath&"/"
end if
If tempCurrentPath="" Then
CurrentPath=DirectoryRoot
Else
CurrentPath=DirectoryRoot & tempCurrentPath
End If
If Fso.FolderExists(Server.MapPath(CurrentPath)) Then
'获得虚拟文件系统主目录DirectoryRoot
Set Fol=Fso.GetFolder(Server.MapPath(CurrentPath))
Else
'若虚拟文件系统主目录未找到,则创建该目录
If CurrentPath=DirectoryRoot Then
Fso.CreateFolder(Server.MapPath(CurrentPath))
Set Fol=Fso.GetFolder(Server.MapPath(CurrentPath))
End If
End If
'fpath="E:\公共\duihao.net\duihao.net\chengxu\FileSystem" ' 此处设置你要查看目录
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(CurrentPath)
Set fc = f.Files
asdf=f.ShortPath
For Each f1 in fc '显示文件
s = f1.name
vfilepath=asdf & "\" & s
response.write "<option value='file'>" & s & "</option>"
Next%>
报错地方是
Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'FilterPath'
/admin/ChanPinFenLei.asp,行 19