سلام
درسته حق با شماست اما کد زیر این مشکل را حل می کند.
[/code]
[align=left]
<%
Const ForReading = 1
Dim objOpenFile, objFSO, strPath, iCount
strPath = strPath & "counter/counter.txt"
strPath = Server.MapPath(strPath)
Set objFSO = _
Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strPath) Then
Set objOpenFile = _
objFSO.OpenTextFile(strPath, ForReading)
iCount = Cint(objOpenFile.ReadLine) + 1
objOpenFile.Close
Else
iCount = 1
End if
Set objOpenFile = _
objFSO.CreateTextFile(strPath, True)
objOpenFile.WriteLine(iCount)
objOpenFile.Close
Set objOpenFile = Nothing
Set objFSO = Nothing
%>
<%
Dim objOpenFile1, objFSO1, strPath1
strPath1 = strPath1 & "counter/counter.txt"
strPath1 = Server.MapPath(strPath1)
Set objFSO1 = _
Server.CreateObject("Scripting.FileSystemObject")
If objFSO1.FileExists(strPath1) Then
Set objOpenFile1 = _
objFSO1.OpenTextFile(strPath1,1)
response.write (objOpenFile1.ReadLine)
objOpenFile1.Close
End if
Set objOpenFile1 = Nothing
Set objFSO1 = Nothing
%>