您现在的位置是:网站首页> 编程资料编程资料
asp实现检查目录是否存在与建立目录的函数_应用技巧_
2023-05-25
289人已围观
简介 asp实现检查目录是否存在与建立目录的函数_应用技巧_
'-------------------------
'--检查目录是否存在
'----------------------
Function CheckDir(byval FolderPath)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(Server.MapPath(folderpath)) then
'存在
CheckDir = True
Else
'不存在
CheckDir = False
End if
Set fso = nothing
End Function
'-------------------------
'--建立目录
'----------------------
Function MakeNewsDir(byval foldername)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.CreateFolder(Server.MapPath(foldername))
If fso.FolderExists(Server.MapPath(foldername)) Then
MakeNewsDir = True
Else
MakeNewsDir = False
End If
Set fso = nothing
End Function
'--检查目录是否存在
'----------------------
Function CheckDir(byval FolderPath)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(Server.MapPath(folderpath)) then
'存在
CheckDir = True
Else
'不存在
CheckDir = False
End if
Set fso = nothing
End Function
'-------------------------
'--建立目录
'----------------------
Function MakeNewsDir(byval foldername)
dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.CreateFolder(Server.MapPath(foldername))
If fso.FolderExists(Server.MapPath(foldername)) Then
MakeNewsDir = True
Else
MakeNewsDir = False
End If
Set fso = nothing
End Function
相关内容
- ScriptHtml 函数之过滤html标记的asp代码_应用技巧_
- GetPaing 函数之asp采集函数中用到的获取分页的代码_应用技巧_
- FpHtmlEnCode 函数之标题过滤特殊符号的代码_应用技巧_
- SaveRemoteFile函数之asp实现保存远程的文件到本地的代码_应用技巧_
- ASP检查文件与目录是否存在的函数代码_应用技巧_
- ReplaceTrim 函数之asp实现过滤掉字符中所有的tab和回车和换行的代码_应用技巧_
- FormatRemoteUrl函数之asp实现格式化成当前网站完整的URL-将相对地址转换为绝对地址的代码_应用技巧_
- ASP+XML实例演练编程代码第1/3页_应用技巧_
- asp实现防止从外部提交数据的三种方法第1/3页_应用技巧_
- asp又一个分页的代码例子_应用技巧_
