logo
电话:13843226952
 
工作时间:周一至周六:8:30-5:00  周日可联系客服QQ
   
  建站咨询㈠ 建站咨询㈡ 售后服务 售前咨询  
关于阳光,吉林市网站建设,吉林市网站制作,网络公司
 当前位置:本站首页 >>> 技术中心

网站建设经验之-asp生成目录与无限生成多级目录创建

日期:2010/9/25    来自:吉林市阳光网络科技有限公司   作者:Admin   去百度查找  去Google查找

asp教程生成目录与无限生成多级目录创建
'这里提供二款asp目录生成函数,第一款是只能创建一级目录,后一款函数可以支持多目录同时生成。
'

sub efolder(foldername)
dim fso
set fso=server.createobject("scripting.filesystemobject")
if fso.folderexists(server.mappath(foldername)) then
set fso=nothing
exit sub
else
fso.createfolder(server.mappath(foldername))
end if
set fso=nothing
end sub
'===================================================================

sub arrayfolder(path,sep)
dim arraypath,epath,newpath
arraypath = split(path,sep)
newpath=""
for each epath in arraypath
newpath=newpath&epath&"/"
newpath = replace(newpath,"//","/")
efolder newpath
next
end sub

arrayfolder "1/2/3","/"

'生成多级目录

'建立目录的程序,如果有多级目录,则一级一级的创建
function createdir(byval localpath)
on error resume next
localpath = replace(localpath,"","/")
set fileobject = server.createobject("scripting.filesystemobject")
patharr = split(localpath,"/")
path_level = ubound(patharr)
for i = 0 to path_level
if i=0 then pathtmp=patharr(0) & "/" else pathtmp = pathtmp & patharr(i) & "/"
cpath = left(pathtmp,len(pathtmp)-1)
if not fileobject.folderexists(cpath) then fileobject.createfolder cpath
next
set fileobject = nothing
if err.number <> 0 then
createdir = false
err.clear
else
createdir = true
end if
end function%>

更多详细内容请查看:网站建设知识网

 
上一篇:网站优化及网站推广的经验总结
下一篇:注意你的网站布局对访者的友好程度
  阳光新闻 更多>>>
吉林网站建设_吉林网页制作-阳光新闻
移动建站的优势在哪?
如何规划网站的主题
网站优化注意事项
网站建设的趋势
网站建设对企业发展有哪些助力
小程序未来的市场前景
  招贤纳士 更多>>>
诚聘销售精英合作伙伴
诚招吉林市网站建设商务经理
招聘吉林市网站建设技术员
公司招收吉林市网站开发学员
因业务发展需要特诚聘商务代表
  网站建设专题 更多>>>
阳光科技为您提供网站改版服务
为什么网页设计要简练?
如何在百度提交收录,怎样让自己的网站排名
什么样的网站最受访客喜欢?
吉林市网站建设形式与内容应统一
网站管理与团队经营的秘诀
优质的单页网站如何创建
 
Copyright © 2008-2019 www.jlsyg.com, All Rights Reserved    
电话:13843226952  联系人:王经理
ICP备案号:吉ICP备10003760号   技术支持:吉林网站建设
打造好的吉林网络公司!我们为您提供有品质的吉林网站建设吉林市网站建设吉林网站制作吉林网页制作吉林网站优化吉林seo服务!