I need some help with fixing a page counter. It worked on my web site when I was with another web hosting company. I've been messing with the code. Please take a look at the code below. Please look at the code that is in blue. I need help with fixing this.
<%
Dim strPath, File, file2, x,liCount, j ,resfile, d, i ,fl, FileName
'strPath = "counter.txt"
'Set connection details
'strPath = Server.MapPath(".")
'strPath = Replace(strPath,"html","database")
'FileName = "counter.txt"
strPath = "D:\www\database\counter.txt"
Set File = Server.CreateObject("Scripting.FileSystemObject")
set file2=File.OpenTextFile(strPath)
x=file2.readline
set resfile = File.createTextFile (strPath)
resfile.writeline(x+1)
liCount=Cstr(x+1)
j = Len(liCount)
d=9 - j
%>
<%
For i=1 to d step 1
Response.Write ("<IMG SRC='/digits/0.gif'>")
Next
For i=1 to j step 1
fl="" + Mid(liCount, i , 1) + ".gif"
Response.Write ("<IMG SRC=") & (fl) & ">"
Next
%>