可以在线创建文件夹吗?
作者:
folder.htm
<html>
<head>
<title>闪亮日子之在线创建文件夹</title>
</head>
<body>
春风精彩<br>
在线创建文件夹</td>
<tr>
<td height="28"><form name="form1" method="post" action="creatfolder.asp">
<div align="center"><center><p>新建文件夹:
<input type="text" name="name" size="20" style="font-size: 12pt">
<input type="submit" name="Submit" value="创建" style="font-size: 12pt"> </p>
</center></div>
</form>
</td>
</tr>
</center></div>
</body></html>
creatfolder.asp
<%@ LANGUAGE = "VBScript" %>
<%
Dim Name
Name = Request("Name")
set fs=createobject("scripting.filesystemobject")
MyFolder=server.mappath(""&name&"")
If NOT fs.folderexists(MyFolder) then
fs.createfolder(MyFolder)
End If
If fs.folderexists(MyFolder) then
%> 恭喜,文件夹创建成功!命名为:<%=MyFolder%>
<%Else%%>
出错啦!请返回重试.
<%End If
%>