removecache.asp
来自「小游戏网站演示www.4399.io 拥有4万条游戏数据」· ASP 代码 · 共 46 行
ASP
46 行
<!--#include file="config.asp" -->
<%
Dim p,Rs
p = ubb.CheckSpecialChar(Request("p"))
Set Rs = Newasp.Execute("SELECT * FROM [NC_Admin] WHERE isLock=0 And password='" & Newasp.Checkstr(p) & "'")
If Not (Rs.BOF And Rs.EOF) Then
Call RemoveAllCache()
Response.Write "<script>alert('更新缓存成功!');</script>"
End If
Set Rs = Nothing
Set NewCloud = Nothing
CloseConn
Sub RemoveAllCache()
Dim cachelist,i
Call InnerHtml("UpdateInfo","<b>开始执行清理当前站点缓存</b>:")
Cachelist=split(GetallCache(),",")
If UBound(cachelist)>1 Then
For i=0 to UBound(cachelist)-1
DelCahe Cachelist(i)
Call InnerHtml("UpdateInfo","更新 <b>"&cachelist(i)&"</b> 完成")
Next
Call InnerHtml("UpdateInfo","更新了"& UBound(cachelist)-1 &"个缓存对象<br>")
Else
Call InnerHtml("UpdateInfo","<b>当前站点全部缓存清理完成。</b>。")
End If
End Sub
Function GetallCache()
Dim Cacheobj
For Each Cacheobj in Application.Contents
GetallCache = GetallCache & Cacheobj & ","
Next
End Function
Sub DelCahe(MyCaheName)
Application.Lock
Application.Contents.Remove(MyCaheName)
Application.unLock
End Sub
Sub InnerHtml(obj,msg)
Response.Write "<li>"&msg&"</li>"
Response.Flush
End Sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?