Object | template <%
’*************************************************************
' Please keep this declaration information when forwarding, this statement does not affect your speed!
’*************************************************************
’*************************************************************
' @author: Noodles
' @realname: Xu Renru
' @email: xurenlu@sohu.com
' @QQ: 55547082
' @Homepage: http://www.ksdn.net
' @ Copyright statement:
' Non-Profit groups or individuals are free to use.
’*************************************************************
I can guarantee this procedure by oneself completes independently, does not have the reference other people's any procedure (to refer to my own PHP version the template, but that also I independently completes.) At the same time I declare all the examples of this class copyright is my own, any person or entity entities may not be arbitrarily changed
' This template can be used for free:
' 1. Non-commercial application of the individual.
' 2. Charitable organizations such as the Red Cross, orphanages, etc.
’
' Specific use of the method please see example.asp file.
’
' Adsavecreateoverwrite
Class template
Dim adsavecreateoverwrite
Dim adsavecreatenotexist
Public Starttag
Public Endtag
public filename
Dim Key_arr ()
Dim Val_arr ()
Public content
Public total
Public Contenta ()
The contents of the public blockcontent ' block (parsed)
Public Block_begin_delim
Public Block_end_delim
Public Block_begin_word
Public Block_end_word
Public Block_null
Initialization of Sub Class_Initialize () ' Class
ReDim Key_arr (0)
ReDim Val_arr (0)
ReDim Contenta (0)
adsavecreateoverwrite=2
Adsavecreatenotexist=1
Starttag= "{"
Endtag= "}"
Total=0
Block_begin_word= "Begin"
Block_end_word= "End"
Block_begin_delim= "<!--"
Block_end_delim= "-->"
Block_null= "" ' begin and end separated by a space
End Sub
Sub Echo (a)
Response.Write A
End Sub
function ReadFile (filepath)
Dim stm2
On Error Resume Next
Set STM2 =server.createobject ("ADODB.") Stream ")
STM2. Charset = "gb2312"
STM2. Open
STM2. LoadFromFile filepath
ReadFile = stm2. ReadText
End Function
function WriteFile (filepath,str) ' Write to File
Dim stm
On Error Resume Next
Set stm = Server.CreateObject ("ADODB.") Stream ")
Stm. Charset = "gb2312"
Stm. Open
Stm. WRITETEXT Str
Stm. SaveToFile filepath, Adsavecreateoverwrite
End Function
function setfile (file) ' settings file, read file contents
Filename=file
Content=readfile (file)
End Function
Whether the function inarray (Val,arr) ' Val is in the array arr