Adding text to the beginning of a file

Results 1 to 2 of 2

Thread: Adding text to the beginning of a file

  1. #1
    Kevin Guest

    Default Adding text to the beginning of a file

    Hello!<BR><BR>Is there any way I can add text to the beginning of a file? I&#039m thinking of something like a guestbook file - where the latest entry is added to the top of the file. I don&#039t really want to use a database, just a simple text file.<BR><BR>Thanks,<BR><BR>Kevin.

  2. #2
    Brad Kingsley Guest

    Default RE: Adding text to the beginning of a file

    You can always read the contents of the text file and append it to the end of the new string then write it out to a fresh text file. Hits the file twice rather than once, but it will work.<BR><BR>-Brad Kingsley, MCP - NT, IIS4<BR>Reliable Windows NT Web Hosting<BR>ORCS Web, Inc - http://www.ORCSWeb.com

Posting Permissions

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