★ wanayoo — archive 1999 http://fr.php.net/manual/fi/function.rewind.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousrenamermdirnext
Last updated: Tue, 28 May 2002
view the printer friendly version or the printer friendly version with notes or change language to English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Polish | Romanian | Russian | Slovak | Spanish | Swedish | Turkish

rewind

(PHP 3, PHP 4 >= 4.0.0)

rewind -- Rewind the position of a file pointer

Description

int rewind ( int fp)

Sets the file position indicator for fp to the beginning of the file stream.

If an error occurs, returns 0.

The file pointer must be valid, and must point to a file successfully opened by fopen().

Huomaa: If you have opened the file in append ("a") mode, any data you write to the file will always be appended, regardless of the file position.

See also fseek() and ftell().

User Contributed Notes
rewind
add a note about notes
22-Mar-2001 12:35
rewind doesn't work if you are trying to write to a file that you have opened in a or a+ mode. The write always appends to the end of the file (unless you use ftruncate to set the file size to zero)
add a note about notes
previousrenamermdirnext
Last updated: Tue, 28 May 2002
show source | credits | stats | mirror sites
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: nexen.net
Last updated: Sat Nov 23 04:10:11 2002 CET