Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path problem reading from file Server 2000 1

Status
Not open for further replies.

Lil8

Technical User
Oct 24, 2003
42
GB
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>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top