Hi.I am putting up a new site.Know noting of asp ,but learned that to do the stuff I want, have to use asp.Anyways the problem is this:
I want to write a simple asp code that will take the comments that was written by the guest in to a text area and put it in a text document which is on the server.
I found some code snippets but because I know nothing about asp.I need your help.Thanks for the help in advance.Ah forgot my site that I am trying to work this code is www.johnroach.edu.tc .
<%
Dim oFilesys
Set oFilesys = Server.CreateObject("Scripting.FileSystemObject")
If NOT oFilesys.FileExists("C:\FSOfolder\newfile.txt") Then
oFilesys.CreateTextFile("C:\FSOfolder\newfile.txt")
Else
Response.Write "This file already exists."
End If
Set oFilesys = NOTHING
%>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim oFilesys, oFile
Set oFilesys = CreateObject("Scripting.FileSystemObject")
Set oFile = oFilesys.OpenTextFile("C:\FSOfolder\newfile.txt", ForWriting, True)
oFile.Write "Hello world!"
%>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim oFilesys, oFile
Set oFilesys = CreateObject("Scripting.FileSystemObject")
Set oFile = oFilesys.OpenTextFile("C:\FSOfolder\newfile.txt", ForAppending, True)
oFile.Write "This is my text file."
%>
PS Can this snippet actually work.And If you can tell me how to integrate this asp code to the html I would be very happy thanks again