如何用表单在线建立目录?

creatfolder.htmxml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??

表单文件.

<form name=”form1″ method=”post” action=”folder.asp”>
创建一个文件夹:
<input type=”text” name=”name”>
<input type=”submit” name=”Submit” value=”
提交“>
</form>

 

folder.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
%>

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2023年12月29日
下一篇 2023年12月29日

相关推荐