国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

asp目錄讀寫權限檢測腳本 TestFolder

2024-05-04 10:59:49
字體:
來源:轉載
供稿:網友
效果圖:


復制代碼 代碼如下:
<%
'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 " "
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
%>

另外錯新站長站提供一份源碼下載//www.survivalescaperooms.com/codes/39929.html

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 元朗区| 新竹县| 唐山市| 梅州市| 磐安县| 临清市| 绥德县| 梁平县| 西藏| 抚州市| 乌恰县| 辽宁省| 黑水县| 梅河口市| 博湖县| 新巴尔虎右旗| 安庆市| 无棣县| 盐城市| 临江市| 临邑县| 霍林郭勒市| 伊金霍洛旗| 玉林市| 卓资县| 南溪县| 中阳县| 永康市| 南靖县| 普兰县| 通河县| 徐汇区| 武冈市| 屯昌县| 拉萨市| 汕头市| 手游| 连平县| 星座| 永川市| 陕西省|