<%Function GCounter( counter ) Dim S, i, G,f S = CStr( counter ) ' ' f=6-Len(s) For i=1 to f G=G & "" Next For i = 1 to Len(S) G = G & "" Next GCounter = G End Function Dim Counter Sub IncrementCounter() ' Set fs = Server.CreateObject("Scripting.FileSystemObject") counter_file = Server.MapPath("counter.txt") ' counter Set txt = fs.OpenTextFile( counter_file ) Counter = txt.ReadLine txt.Close ' Counter = Counter + 1 ' /counter.txt ???t???D Set txt = fs.CreateTextFile( counter_file, True ) txt.WriteLine(Counter) txt.Close End Sub Application.Lock IncrementCounter ' D Application.UnLock %>











您是第位访客