For a guide to the choosing ASP or PHP, click here
Home >> Text Files >> Writing to a Text File This code shows how to write to a text file
<% ' declare our variables dim fso dim file1 dim ourFile dim toFile ' this is the file to read from ourFile = "Filename.txt" ' this is the text we want to write toFile = "Hey buddy" ' this will open the file and write to it Set fso = CreateObject("Scripting.FileSystemObject") Set file1 = fso.CreateTextFile(Server.MapPath(ourFile), 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 %> What is ASP?
What is PHP?