大家看看是不是有时间帮忙?
'########################
Function CreatePath(sPath)
'生成指定目录结构
'########################
Dim fso
Dim pos
Dim aTmp
Dim sNewpath
Dim n
Set fso=Server.CreateObject("Scripting.FileSystemObject")
pos=Instr(3,sPath,"\",1)
aTmp=Split(Mid(sPath,pos+1),"\")
sNewPath=Left(sPath,pos-1)
For n = 0 to Ubound(aTmp)
sNewPath = sNewPath & "\" & aTmp(n)
If NOT fso.FolderExists(sNewPath) then fso.CreateFolder(sNewPath)
Next
CreatePath=(Err=0)
End Function
这个函数是网上考下来的。
调用:CreatePath("/HTML/Page/"&uname&"/")
操作提示:无效的过程调用或参数: 'Left'
请问是什么原因?