Frågan#1
En enkel räknare.
Börja med att skapa en fil som heter:
count.txt
den kan ligga i tex wwwroot.
I global.asa i SubSession_OnStart:
Sub Session_OnStart
' Start count script
myFile = Server.MapPath("count.txt")
' create counter object
Set objCount = Server.CreateObject("Scripting.FileSystemObject")
Set myCountFile = objCount.OpenTextFile(myFile)
' check for counter cookie
If Request.Cookies("counter") = "1" Then
Application.Lock
Application("counter") = CInt(myCountFile.ReadLine)
myCountFile.Close
Set myCountFile = nothing
Application.UnLock
Else
Response.Cookies("counter") = "1"
Response.Cookies("counter").Expires = DateAdd("d",1,Now())
Application.Lock
Application("counter") = CInt(myCountFile.ReadLine + 1)
myCountFile.Close
Set myCountFile = nothing
Set myCountFile = objCount.CreateTextFile (myFile,true)
myCountFile.WriteLine Application("counter")
Set myCountFile = nothing
Application.Unlock
End If
Set objCount = nothing
End Sub
På de sidor som du vill att räknaren ska visas:
<%
=Application("counter")
%>
Hoppas att det är någon som har användning för denna enkla räknare,
//PatrikB
PS räknaren visar endast text-siffror. Kombinera tex med vides "omvandlare" till bilder DS
------------------
=================================
** ZWGdesign **
=================================
Har ändrat och lagt cookie checken i global.asa om besökaren varit på sidan/siten den senaste dagen(24 timmarna) eller inte....funkade inge bra annars 
[Redigerat av PatrikB den 30 jun 2000]