Below, we use this "Registry" class to write a simple "counter" application, the code is as follows:
PageCount.asp:
<% Dim Regset REG = New RegistryObjectReg.Path = Server.MAppath ("PageCount.xml")
Const basecount = 8000 'Counter Base
Dim countcount = reg.readvalue ("Pagecount", "Common", "count") 'read the original count if isnumeric (count) Then count = clng (count) else count = basecountend ifecount
Count = count 1Reg.SaveValue "Pagecount", "CommON", "count", count 'Save new count set reg = nothing
Response.write ("Document.write"; ") 'display count%>
Test.htm:
script> body> html>
related articles:
Add a registry "class design" to the website to add a registry "class implementation"