#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    14
    Rep Power
    0
    I want to go through a file and pick out different peices of data, so a title then the associated link. However, I do not want to have to close and reopen the file. Is there a way to reset the $file pointer fo it points back to the beginning again?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    33
    Rep Power
    15
    rewind($fd)

    rewind() resets a file pointer identified by the $fd argument which is the return value of the fopen() call. The file pointer is positioned at the beginning of the file. See also ftell() and fseek().
    This is from PHP docs. Good luck!

Similar Threads

  1. Pointer problems opening file *formatted*
    By LAKI in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 06:06 AM
  2. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM
  3. Uploading multiple images using paths all in same .txt file?
    By MarlboroMan in forum Perl Programming
    Replies: 3
    Last Post: February 3rd, 2004, 05:34 PM
  4. How to read multiple line text file into a variable
    By gatewaycityca in forum Visual Basic Programming
    Replies: 4
    Last Post: January 29th, 2004, 12:26 PM
  5. Active perl multiple search when file is open
    By melinda in forum Perl Programming
    Replies: 3
    Last Post: January 28th, 2004, 04:29 AM

IMN logo majestic logo threadwatch logo seochat tools logo