SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict Chris Roane's Avatar
    Join Date
    Jul 1999
    Location
    Helena, MT
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I know the value "a" adds to the end of the specified file, but how do you make it so that it adds to the beginning of a file?

    I remember seeing how to do this before, but I can't remember where.

    I almost forgot to mention that I am talking about PHP.

    Thanks!

    Chris Roane
    <Edited by Chris Roane on 12-16-2000 at 10:42 AM>

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the documentation of php.net:
    http://www.php.net/manual/function.fopen.php

    It said you could use the mode as "r+" to start writing/reading from the beginning.
    Hope it helps.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  3. #3
    SitePoint Addict Chris Roane's Avatar
    Join Date
    Jul 1999
    Location
    Helena, MT
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I can't believe I missed that when reading that exact page.

    Chris Roane


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
  •