Hi
I have been trying to learn asp and have taken the code to be able to write from a text file textfile.txt using Windows server 2000 and get the error message
map path method must be a virtual path. I have the textfile in a the directory c:/
<html>
<body>
<%
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("text") & "\TextFile.txt",1)
While not rs.AtEndOfStream
Response.Write RS.ReadLine
Response.Write("<br />")
Wend
%>
<p>
<a href="text/textfile.txt"><img border="0" src="/images/btn_view_text.gif"></a>
</p>
</body>
</html>
I have been trying to learn asp and have taken the code to be able to write from a text file textfile.txt using Windows server 2000 and get the error message
map path method must be a virtual path. I have the textfile in a the directory c:/
<html>
<body>
<%
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("text") & "\TextFile.txt",1)
While not rs.AtEndOfStream
Response.Write RS.ReadLine
Response.Write("<br />")
Wend
%>
<p>
<a href="text/textfile.txt"><img border="0" src="/images/btn_view_text.gif"></a>
</p>
</body>
</html>