'二款简单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
深海迷航2生物反应堆蓝图获取指南-生物反应堆解锁方法详解
Zeb Orrelios身份解析:揭秘Din Djarin在《The Mandalorian and Grogu》中的关键新盟友
深海迷航2石英前期获取指南-石英采集方法与技巧
深海刮刮乐体验如何:深海刮刮乐详细玩法解析
今日限时特惠:M5 MacBook Air_AirPods Pro 3_Monster Hunter Stories 3等多款好物
每日瑜伽:怎样调整你的练习目标