Click here to See


 

     
       
   
 
 
 

 
  <% 'on error resume next 'err = 0 dim objFS, fleHits 'optionally we could create the initial file by hand Set objFS = CreateObject("Scripting.FileSystemObject") Set fleHits = objFS.OpenTextFile(server.MapPath("cgi-bin/shakirhits.txt"),1) if isObject(fleHits) then currentHits = fleHits.ReadLine if isNumeric(currentHits) then currentHits = clng(currentHits) else currentHits = 0 end if else currentHits = 0 end if fleHits.Close 'now we have the current hits currentHits = cstr(currentHits + 1) 'save the new hit to file Set fleHits = objFS.CreateTextFile(server.MapPath("cgi-bin/shakirhits.txt"),True) fleHits.writeLine cstr(currentHits) fleHits.close set objFs=nothing response.write currentHits %>