最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 判断是文件或目录函数
时间:2022-06-29 13:47:41 编辑:袖梨 来源:一聚教程网
'二款简单asp来判断文件存或目录存在的函数,在asp中这样做只要用到filesystemobject就ok了。
function isdir(givepath)
dim realpath,path,num,fs,i
set fs = createobject("scripting.filesystemobject")
path=givepath
if fs.folderexists(path)=true then
isdir=true
else
isdir=false
'fs.createfolder(realpath)
end if
set fs=nothing
end function
function isfile(fpath)
dim fs
set fs = createobject("scripting.filesystemobject")
if fs.fileexists(fpath)=false then
isfile=false
else
isfile=true
end if
set fs=nothing
end function
dim d="a"
if isdir(a) then
response.write("是目录")
else
response.write("不是目录")
end if
dim b="www.111com.net/"
if isfile(b) then
response.write("是文件")
else
response.write("不是文件")
end if
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17