Home Page Services Solutions Articles History Contacts Links Versione Italiana
Software
2D Creations
3D Creations
Images
Open Source
Projects
Web Utilities
Graphic Tools
Downloads
Documents

SEMPLICE CONTATORE IN VBSCRIPT


Ecco a voi l'implementazione di un banalissmo ma utilissimo contatore.

Per non complicare troppo le cose supporremo per il funzionamento di
questo contatore che esista un file di testo iniziale con memorizzato
il valore 0 (Zero) come valore iniziale. E' possibile creare un file di
questo tipo con qualsiasi editor di testo a patto di salvarlo come solo
testo.

Il funzionamento di questo contatore è semplicissimo, ad ogni reload della pagina verrà aperto il file di log del contatore, verrà letto il valore testuale, convertito in numero ed incrementato, poi rimesso nel file.

Più semplice non è possibile!

Precisando che PERCORSO è il percorso completo della Directory contentente il file counter.log e quest'ultimo è un file iniziale che parte con il valore 0 o il valore da cui vogliamo farlo partire, proseguiamo:

DIM PathLog, LongCount  
Set PathLog=<strong>PERCORSO</strong> & "counter.log"
Set 'FileCounter=Server.CreateObject("Scripting.FileSystemObject")
Set FileStream=FileCounter.OpenTextFile(PathLog)
LongCount=CLng(FileStream.ReadLine) + 1
FileStream.Close
Set FileStream=FileCounter.CreateTextFile(PathLog)
FileStream.WriteLine(LongCount)
FileStream.Close
Response.Write(LongCount)

Logicamente mi sembra che dovrebbe andare, se comunque non vi dovesse
funzionare provate a contattarmi via e-mail.


Giovanni Ceglia
giovanniceglia@xungame.com


Home Page Services Solutions Articles History Contacts Links Italian Version

Personal sites and projects: E-Mercanti Services, Programmers Community, E-Merchants Community, Game Developing Community, Programming & Videogames, Programming Portal, Graphic Portal, Services for people looking for a job, Search Engine for Accommodations, Hosting Services, Internet Services for Identity Verification, Cheap Hosting Services and Domain Registration, Hardware and Software E-Shop, The Whole Giovanni Ceglia's Network. Real Estate Listings in English, Real Estate Listings in Italian, Real Estate Listings in German, Malmignatta Search Engine, Malmignatta Search Engine in English.


All material on this site is © CopyRight Giovanni Ceglia since 2003, all the right are reserved, the copy and redistribution of the material on this site is forbidden without permission. If there are words about trade marks they are of respective owners. Giovanni Ceglia - Computer Science Services & Programmer, Internet and Hosting Services, Business Number(Italian IVA) N. 03972320653, Based in Via Trento N.74 84016, Pagani (Salerno) Italy, E-Mail: giovanniceglia@xungame.com, Mobile Photne for contacts: 339-4403189.