将以下代码另存为 clearinfo.asp,上传到博客根目录,执行后会自动删除安装文件
清空博客访问量
SQL="update blog_Info set blog_VisitNums=0"
UpdateSQL SQL
response.write "博客访问次数清空"
'SQL="Update blog_Member SET mem_PostLogs = 0 Where (((mem_Name)='名字'))"'将指定名字的发贴数设置为0
'UpdateSQL SQL
response.write "清空博客访问量成功"
response.write "请在后台执行“初使化数据”和“清空服务器缓存”"
DeleteFiles(Server.MapPath("清空博客访问量.asp"))
%>
安装完成... 自动删除安装文件.
<%
Conn.Close
Set Conn=Nothing
function UpdateSQL(SQLString)
On Error Resume Next
Conn.execute SQLString
if err then
response.write " "&err.description&""
else
response.write "执行: "&SQLString&""
end if
end function
Function DeleteFiles(fileName)
dim upl
set upl=Server.CreateObject("Scripting.FileSystemObject")
IF upl.FileExists(fileName) Then
upl.DeleteFile fileName,True
DeleteFiles = True
Else
DeleteFiles = false
End IF
End Function
%>