Plz Help!! Prob With Asp!!

Status
Not open for further replies.

evil_maverick

Journeyman
hello ppl
am new to asp!!
and i was doing some asp prgmin (i hv win xp pro installed)
but i am getting this err -->
Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/MyWeb/cnt.asp, line 8


whenever am trying to run my application!!
plz help!!

i hv saved the following under wwwroot/MyWeb
and the name of the file is cnt.asp
code for the application--:
<%
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

%>

<html>
<body>
<p>
cnt=<%=fcount%>
</p>
</body>
</html>
 

ilugd

Beware of the innocent
something seems to be wrong in the line
Code:
Set RS=FS.openTextFile(Server.MapPath("counter.txt"),2 ,False)
but on a side note, is it RS.Write fcount or RS.WriteLine fcount?
 
Status
Not open for further replies.
Top Bottom