944,146 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 2570
  • ASP RSS
Mar 23rd, 2005
0

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

Expand Post »
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
Similar Threads
Reputation Points: 11
Solved Threads: 0
Junior Poster
johnroach1985 is offline Offline
135 posts
since Apr 2004
Mar 24th, 2005
0

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

thanks I found my answers sorry for the trouble.
Reputation Points: 11
Solved Threads: 0
Junior Poster
johnroach1985 is offline Offline
135 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: repeat region into declared variable (jmail body)
Next Thread in ASP Forum Timeline: Please Help!!! MOD function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC