Results 1 to 2 of 2

Thread: Simple text i/o

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Columbus Ohio
    Posts
    217
    Ok im learnign asp, I posted this here because it gets so much more traffic. Heres my question. using asp and the FileSystemObject how do I output to a text file? I know how to input just not output. Thanks
    Chris

    [email protected]
    Windows XP RC2 B2526
    Visual Studio.Net Beta 2
    C++, VB, VB.Net, ASP, PHP

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    <%
    set objFSO = createObject ("scripting.FileSystemObject")
    if (objFSO.FileExists (lcase(Server.Mappath(" -- insert the path to the text or html file here -- ")))) then
    set objTextStreamIn = objFSO.OpenTextFile (lcase(Server.Mappath("the path")))
    StrFile = objTextStreamIn.ReadAll
    objTextStreamIn.close
    set objTextStreamIn = nothing
    end if
    %>
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width