|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
减少客户内IT专业人才缺乏带来的影响。ASP的客户员工利用浏览器进入相关的应用软件,简单易用,无需专业技术支持。创立|函数 <%
'创立多级目次,可以创立不存在的根目次
'参数:要创立的目次称号,可所以多级
'前往逻辑值,True胜利,False掉败
'创立目次的根目次从以后目次入手下手
'---------------------------------------------------
FunctionCreateMultiFolder(ByValCFolder)
DimobjFSO,PhCreateFolder,CreateFolderArray,CreateFolder
Dimi,ii,CreateFolderSub,PhCreateFolderSub,BlInfo
BlInfo=False
CreateFolder=CFolder
OnErrorResumeNext
SetobjFSO=Server.CreateObject("Scripting.FileSystemObject")
IfErrThen
Err.Clear()
ExitFunction
EndIf
CreateFolder=WordStr(CreateFolder,"","/")
IfLeft(CreateFolder,1)="/"Then
CreateFolder=Right(CreateFolder,Len(CreateFolder)-1)
EndIf
IfRight(CreateFolder,1)="/"Then
CreateFolder=Left(CreateFolder,Len(CreateFolder)-1)
EndIf
CreateFolderArray=Split(CreateFolder,"/")
Fori=0toUBound(CreateFolderArray)
CreateFolderSub=""
Forii=0toi
CreateFolderSub=CreateFolderSub&CreateFolderArray(ii)&"/"
Next
PhCreateFolderSub=Server.MapPath(CreateFolderSub)
IfNotobjFSO.FolderExists(PhCreateFolderSub)Then
objFSO.CreateFolder(PhCreateFolderSub)
EndIf
Next
IfErrThen
Err.Clear()
Else
BlInfo=True
EndIf
CreateMultiFolder=BlInfo
EndFunction
%>
'利用办法:
Response.WriteCreateMultiFolder("/upload/2005/3/26/")&"<br>"
Response.WriteCraeteMultiFolder("upload2005326")
'函数的前往值为True(胜利)或False(掉败,可所以主机不撑持FSO功效)减少客户内IT专业人才缺乏带来的影响。ASP的客户员工利用浏览器进入相关的应用软件,简单易用,无需专业技术支持。 |
|