need help on I/O in AsP(ASAP PLEASE)

Reply

Join Date: Apr 2004
Posts: 129
Reputation: johnroach1985 is an unknown quantity at this point 
Solved Threads: 0
johnroach1985's Avatar
johnroach1985 johnroach1985 is offline Offline
Junior Poster

need help on I/O in AsP(ASAP PLEASE)

 
0
  #1
Mar 23rd, 2005
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
"By the data to date, there is only one animal in the Galaxy dangerous to man—man himself. So he must supply his own indispensable competition. He has no enemy to help him."
From Time Enough for Love by Robert A. Heinlein
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 129
Reputation: johnroach1985 is an unknown quantity at this point 
Solved Threads: 0
johnroach1985's Avatar
johnroach1985 johnroach1985 is offline Offline
Junior Poster

Re: need help on I/O in AsP(ASAP PLEASE)

 
0
  #2
Mar 24th, 2005
thanks I found my answers sorry for the trouble.
"By the data to date, there is only one animal in the Galaxy dangerous to man—man himself. So he must supply his own indispensable competition. He has no enemy to help him."
From Time Enough for Love by Robert A. Heinlein
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC