i am trying to make a hit counter that displays that how many times a page has been visited. the code is given below and is not working. any suggestions for the corrections?
error:
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
Code:
<% Set FS=Server.CreateObject("Scripting.FileSystemObject") Set RS=FS.OpenTextFile(Server.MapPath("array.asp"), 1, False) fcount=RS.ReadLine RS.Close fcount=fcount+1 Set RS=FS.OpenTextFile(Server.MapPath("array.asp"), 2, False) RS.Write fcount RS.Close Set RS=Nothing Set FS=Nothing %> <html> <body> <p> This page has been visited <%=fcount%> times. </p> </body> </html>
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
Comment