Error
===> in this line "Set WriteTotals = ...."
Error Details:
Error Type: Microsoft VBScript runtime
Associated Error Number: 800A0046
Cause/Symptoms:
A quick scan of the failing ASP file's contents reveals an object being
creating programmatically using the inherent VBScript function
CreateObject or the ASP Server object function Server.CreateObject with
one of the following class strings:
Scripting.FileSystemObject
Scripting.Dictionary
In addition, this file may attempt to create, access or delete other
files on the server programmatically using an object reference created
from the first class string mentioned above.
Code used
============
<%
Dim x
Dim FSObject
Dim GetTotals
Dim WriteTotals
Dim PageEntry
Dim PageHits()
Dim PageName()
Dim ThisPage
'What page are we on?
ThisPage = Request.ServerVariables("URL")
Set FSObject = CreateObject("Scripting.FileSystemObject")
Set GetTotals =
FSObject.OpenTextFile("C:\Inetpub\wwwroot\counters \PageTotals.txt",1,0)
x=0
While Not GetTotals.AtEndOfStream
ReDim preserve PageName(x)
PageName(x) = GetTotals.ReadLine
If PageName(x) = ThisPage Then
ReDim preserve PageHits(x)
PageHits(x) = GetTotals.ReadLine + 1
DisplayCount = PageHits(x)
x = x + 1
Else
ReDim preserve PageHits(x)
PageHits(x) = GetTotals.ReadLine
x = x + 1
End If
Wend
GetTotals.Close
Set GetTotals = Nothing
Set WriteTotals =
FSObject.CreateTextFile("C:\Inetpub\wwwroot\counte rs\PageTotals.txt")
x = 0
For Each PageEntry In PageName
WriteTotals.WriteLine PageName(x)
WriteTotals.WriteLine PageHits(x)
x = x + 1
Next
WriteTotals.Close
Set WriteTotals = Nothing
Set FSObject = Nothing
Response.Write("<font size=2><b>You are " & ThisPage & _
" Page visitor number...</b></font><br>" & _
DisplayCount & "</font>")
%>
============
For other info contact me .
Thanks
RobertoF
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!