Vbscript VisualScript中的请求表单错误

Vbscript VisualScript中的请求表单错误,vbscript,scripting,Vbscript,Scripting,您好,我希望有人能帮助我解决这个visualscript filesystemobject问题 <% 'Creating the subfolders' Public objFSO Sub Main() Set objFSO = CreateObject("Scripting.FileSystemObject") Call GeneratePath("C:\Inetpub\wwwroot\sites") Call GeneratePath("C:\Inetpub\wwwroot\s

您好,我希望有人能帮助我解决这个visualscript filesystemobject问题

    <%
'Creating the subfolders'
Public objFSO
Sub Main()
Set objFSO = CreateObject("Scripting.FileSystemObject")
Call GeneratePath("C:\Inetpub\wwwroot\sites")
Call GeneratePath("C:\Inetpub\wwwroot\sitesx")
End Sub
Function GeneratePath(pFolderPath)
GeneratePath = False
If Not objFSO.FolderExists(pFolderPath) Then
If GeneratePath(objFSO.GetParentFolderName(pFolderPath)) Then 
GeneratePath = True
Call objFSO.CreateFolder(pFolderPath)
End If
Else
GeneratePath = True
End If
End Function
Call Main
%>
在上面的脚本中

文本区域中的内容示例

Call GeneratePath("C:\Inetpub\wwwroot\sites1")
Call GeneratePath("C:\Inetpub\wwwroot\sites2")
Call GeneratePath("C:\Inetpub\wwwroot\sites3")
Call GeneratePath("C:\Inetpub\wwwroot\sites4")
是否可以在文本区域中收集表单中的数据?并将这些提交到上述脚本中?类似于Request.Formfolders

我试过上面的方法,但不知怎么的,它没有被执行,但也没有产生错误


任何想法和帮助都将不胜感激

不要在文本区域中输入代码,只需输入值即可。然后循环遍历按回车分隔的文本,以获取文件夹名称,并使用每个名称调用函数。比如:

Dim FolderList, FolderName
FolderList = Split(Request.Form("folders"), vbCrLf)
For Each FolderName In FolderList
 GeneratePath(FolderName)
Next
其中文本区域的内容为:

C:\Inetpub\wwwroot\sites1
C:\Inetpub\wwwroot\sites2
C:\Inetpub\wwwroot\sites3
C:\Inetpub\wwwroot\sites4

您需要路径集合还是接收可执行语句?请调用generatePath:\Inetpub\wwwroot\sites4
C:\Inetpub\wwwroot\sites1
C:\Inetpub\wwwroot\sites2
C:\Inetpub\wwwroot\sites3
C:\Inetpub\wwwroot\sites4