主页 > 知识库 > asp目录读写权限检测脚本 TestFolder

asp目录读写权限检测脚本 TestFolder

热门标签:世界地图标注了哪些城市 梧州市地图标注 济源电销外呼系统线路 石家庄慧营销外呼系统 武穴地图标注 创意电话机器人 java外呼系统是什么 地图标注阳江 外呼线路批发
效果图:


复制代码 代码如下:

%
'Response.Buffer = FALSE
Server.ScriptTimeOut=999999999
Set Fso=server.createobject("scr""ipt""ing"".""fil""esy""ste""mob""jec""t")
%>
%
sPath=replace(request("sPath"),"/","\")
ShowPath=""
if sPath="" then
ShowPath="C:\Program Files\"
else
ShowPath=sPath
end if
%>
form name="form1" method="post" action="">
label>br>
/label>
label> /label>
table width="80%" border="0">
tr>
td>strong>路径:/strong>
input name="sPath" type="text" id="sPath" value="%=ShowPath%>" style="width:500px;height:25px">
input style="width:160px;height:28px" type="submit" name="button" id="button" value="提交" /> 可以读 不可读 可以写 不可写/td>
/tr>
/table>
/form>
%
Dim i1:i1=0
if sPath>"" then
Call Bianli(sPath)
end if
Set Fso=nothing
%>
%
Function CheckDirIsOKWrite(DirStr)
On Error Resume Next
Fso.CreateTextFile(DirStr"\temp.tmp")
if Err.number>0 then
Err.Clear()
response.write " font color=red>不可写/font>"
CheckDirIsOKWrite=0
else
response.write " font color=green>b>可以写/b>/font>"
CheckDirIsOKWrite=1
end if
End Function
Function CheckDirIsOKDel(DirStr)
On Error Resume Next
Fso.DeleteFile(DirStr"\temp.tmp")
if Err.number>0 then
Err.Clear()
response.write " font color=red>不可删除/font>"
else
response.write " font color=green>b>可以删除/b>/font>"
end if
End Function

Function WriteSpace(NunStr)
for iu=0 to NunStr
response.write "nbsp;"
next
End Function

Function Bianli(path)
On Error Resume Next
i1=i1+1
Set Objfolder=fso.getfolder(path)
Set Objsubfolders=objfolder.subfolders
dim t1:t1=1
WriteSpace(i1)
response.write path
SubFCount=Objsubfolders.count
if Err.number>0 then
SubFCount=-1
Err.Clear()
end if
if SubFCount>-1 then
response.write " font color=green>可以读/font>"
else
response.write " font color=red>不可读/font>"
end if
if SubFCount>-1 then
IsWrite=CheckDirIsOKWrite(path)
if IsWrite=1 then CheckDirIsOKDel(path)
For Each Objsubfolder In Objsubfolders
'response.write "br>("t1"/"Objsubfolders.count")/b>"i1"/b> "vbcrlf
response.write "br> "vbcrlf
Nowpath=path + "\" + Objsubfolder.name
Set Objfolder=nothing
Set Objsubfolders=nothing
Call Bianli(nowpath)'递归
i1=i1-1
t1=t1+1
Next
end if
End Function
%>

另外脚本之家提供一份源码下载https://www.jb51.net/codes/39929.html

标签:淮北 南宁 来宾 揭阳 滁州 唐山 迪庆 甘南

巨人网络通讯声明:本文标题《asp目录读写权限检测脚本 TestFolder》,本文关键词  asp,目录,读写,权限,检测,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《asp目录读写权限检测脚本 TestFolder》相关的同类信息!
  • 本页收集关于asp目录读写权限检测脚本 TestFolder的相关信息资讯供网民参考!
  • 企业400电话

    智能AI客服机器人
    15000

    在线订购

    合计11份范本:公司章程+合伙协议+出资协议+合作协议+股权转让协议+增资扩股协议+股权激励+股东会决议+董事会决议

    推荐文章