Results 1 to 2 of 2

Thread: asp read file

  1. #1
    Join Date
    Feb 2008
    Posts
    81
    Thanks
    8
    Thanked 5 Times in 5 Posts

    Question asp read file

    could any one tell me how i can read a file with asp

    called test.txt!

  2. #2
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Code:
    <%
    Set fs=Server.CreateObject("Scripting.FileSystemObject")
    
    Set f=fs.OpenTextFile(Server.MapPath("test.txt"), 1)
    Response.Write(f.ReadAll)
    f.Close
    
    Set f=Nothing
    Set fs=Nothing
    %>
    There ya go this site is great for basic asp stuff: w3schools.com

Bookmarks

Posting Permissions

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