★ wanayoo — archive 1999 http://uk.php.net/manual/en/function.rewind.phpNouvelle recherche | Portail wanayoo
PHP
Tuesday, January 08, 2002  
downloads | documentation | faq | support | reporting bugs | links 

search for in the  


previousrename
rmdirnext

Last updated: Sat, 05 Jan 2002
view this page in English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Polish | Russian | Spanish | Turkish | Plain HTML

rewind

(PHP 3 <= 3.0.18, 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().

Note: 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 10: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


previousrename
rmdirnext

Last updated: Sat, 05 Jan 2002

show source | credits | mirror sites:  

Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: On-Line PLC
Last updated: Mon Jan 7 23:51:29 2002 GMT