S
spiderman
Hi,
Could someone show me how to write (String data) to a text file from an ASP
page? Thank you
Could someone show me how to write (String data) to a text file from an ASP
page? Thank you
Steven Burn said:<%
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Set objFSO = Server.createobject("scripting.filesystemobject")
strFile = Server.MapPath("the_file.txt")
Set objStream = objFSO.OpenTextFile(strFile, ForAppending, True)
objStream.WriteLine "Some text"
objStream.Close
Set objStream = Nothing
Set objFSO = Nothing
%>
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Steven Burn said:<%
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Set objFSO = Server.createobject("scripting.filesystemobject")
strFile = Server.MapPath("the_file.txt")
Set objStream = objFSO.OpenTextFile(strFile, ForAppending, True)
objStream.WriteLine "Some text"
objStream.Close
Set objStream = Nothing
Set objFSO = Nothing
%>
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.