Using the
File System Object
to
Write to a File
:
Code:
Highlight
<% writeFile server.MapPath("./" & "test.txt"), "blah blah blah" sub writeFile(FilePath,Contents) Dim fso, TextStream Const ForReading = 1, ForWriting = 2 Set fso = CreateObject("Scripting.FileSystemObject") Set TextStream = fso.OpenTextFile(FilePath, ForWriting, True) TextStream.Write (Contents) set fso = nothing end sub %>