Alright, I need to know how to write to a simple .txt file on the server. I tried using this code:
<%
Set FS=Server.CreateObject("Scripting.FileSystemObject"
Set RS=FS.OpenTextFile(Server.MapPath ("counter.txt"
, 1, False)
fcount=RS.ReadLine
RS.Close
fcount=fcount+1
Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"
, 2, False)
RS.Write fcount
RS.Close
Set RS=Nothing
Set FS=Nothing
%>
<p>This page has been visited <%=fcount%>
times.</p>
To make a hit counter, but I get this error:
Microsoft VBScript runtime error '800a0046'
Permission denied
/asp/philly/counter.asp, line 9
Line 9 is:
Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"
, 2, False)
Now, you may be thinking "it's just his server, there's nothing he can do, because his server doesn't allow anythign to write to it". I know this isn't true because I made a guestbook using Frontpage and the webbot thing. So, I know I can write to the server.... I just can't figure out how to do it in ASP!
HELPPPP me please!!
fillup07@hotmail.com -Phil
fillup07@hotmail.com
<%
Set FS=Server.CreateObject("Scripting.FileSystemObject"
Set RS=FS.OpenTextFile(Server.MapPath ("counter.txt"
fcount=RS.ReadLine
RS.Close
fcount=fcount+1
Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"
RS.Write fcount
RS.Close
Set RS=Nothing
Set FS=Nothing
%>
<p>This page has been visited <%=fcount%>
times.</p>
To make a hit counter, but I get this error:
Microsoft VBScript runtime error '800a0046'
Permission denied
/asp/philly/counter.asp, line 9
Line 9 is:
Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"
Now, you may be thinking "it's just his server, there's nothing he can do, because his server doesn't allow anythign to write to it". I know this isn't true because I made a guestbook using Frontpage and the webbot thing. So, I know I can write to the server.... I just can't figure out how to do it in ASP!
HELPPPP me please!!
fillup07@hotmail.com -Phil
fillup07@hotmail.com