For a guide to the choosing ASP or PHP, click here
Home >> Text Files >> Appending to a Text File This code shows how to append text to the end of an existing text file
<% ' declare our variables dim fso dim file1 dim ourFile dim toFile const ForAppending = 8 ' this is the file we will append to ourFile = "Filename.txt" ' this is the text we want to add toFile = "Hey buddy, again" ' this will open the file and write to it Set fso = CreateObject("Scripting.FileSystemObject") Set file1 = fso.OpenTextFile(Server.MapPath(ourFile), ForAppending, True) file1.WriteLine(toFile) file1.close ' this cleans up our objects set file1 = nothing set fso = nothing ' now Filename.txt contains the text: Hey buddy, again %> What is ASP?
What is PHP?