Add a registry "class app" to the website

zhaozj2021-02-16  147

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:

related articles:

Add a registry "class design" to the website to add a registry "class implementation"

转载请注明原文地址:https://www.9cbs.com/read-7924.html

New Post(0)