欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

在线用表单建立文件夹

程序员文章站 2022-06-05 12:26:58
html格式的form表单文件folder.htm的内容:
html格式的form表单文件folder.htm的内容:

<form name="form1" method="post" action="folder-action.asp">
create a folder
<input type="text" name="name">
<input type="submit" name="submit" value="submit">
</form>

asp文件folder-action.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
%> folder created successfully! called
<%=myfolder%>


<%else%%>
there has been an error.
<%end if
%>

也可以下载zip文件,在http://designbliss.com.au/asp/download.asp?file=folder.zip