FINANSSAMVERKAN

Innehåll
Startsida
Medlemskap
Medlemskonton
Lån
Stadgar
Regler och Villkor
Allmänt och FAQ
Kontakta oss
Aktuellt
Översikt

Antal besökare: <% REM This code builds a simple hit counter. REM You will need to change the path in the CounterFile variable CounterFile = "nordspar.cnt" REM This stores the file name in a variable...it could be any file Set fs = CreateObject("Scripting.FileSystemObject") REM use the CreateObject function to create a file object....basicallya handle to it. On Error Resume Next REM Why is the abbove linehere..... i'll come to that ina few lines :) Set a = fs.OpenTextFile(CounterFile,1, 0, 0) c = a.Readline REM Now the first time this executes the file is not present right so this will REM return and error message....that's why the earlier On Error Resume Next statement... set fs = Nothing c = FormatNumber(c + 1,0) REM ....FormatNumber Returns an expression formatted as a number. Set fs = CreateObject("Scripting.FileSystemObject") set b = fs.CreateTextFile (CounterFile, 1, 0) REM Create the file again b.WriteLine c Set b = Nothing Response.Write c REM That's all there is to it %>
(sedan 2000-11-01)