如何清理asp站点缓存的代码
<%
Call RemoveAllCache()
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
%>
相关文档:
ASP高级技术精选集
一、GetRows的使用方法:
<%
Set conn=Server.CreateObject("Adodb.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("test.mdb")
Set Rs=Server.CreateObject("Adodb.Recordset")
Rs.Open "Select Top 2 * from 表名",conn,0,1 &nb ......
JMAIL安装配置
jmail发送邮件的实例代码网上很多.但是有些细节如果不配置好,发送失败的可能性很大.
首先说明一下jmail安装配置步骤:
1. JMail 下载地址
http://hbdx3.skycn.com/down/w3JMail43Personal.exe
2.安装
本人在Windows 2003下面配置,其它系统还没有测试.
安装到目录比如: C:\Program Files\Dimac\w3JMai ......
add.html
<html>
<head>
<title>无组件上传</title>
</head>
<body>
<form method="POST" name="myform" action="xSave.asp" target="_self">
<input name="PicPath" type="text" id="PicPath" readonly="true">
<input name="sPicPath" type="hidden" id="sPi ......
<!--#include file="zheboconn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>asp和mysql分页代码</title>
<style type="text/css">
<!--
.STYLE3 {
fon ......
一、修改格式:调整表头居左;
<!--原来格式-->
/*说明:把整个表头和页面内容居中,当页面内容较长时,表头也居中,看起来像表头错位。*/
<div style="position: absolute;top:3px;">
<center>
<!--#include file="inc/glfcd.inc"-->
<br>
标题
</br& ......