downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

rmdir> <rename
Last updated: Fri, 30 Oct 2009

view this page in

rewind

(PHP 4, PHP 5)

rewindSetzt den Dateizeiger auf das erste Byte der Datei

Beschreibung

int rewind ( resource $handle )

Setzt den Dateizeiger (Datei-Positions-Indikator) für handle an den Anfang des Dateistreams.

Wenn ein Fehler auftritt gibt die Funktion 0, andernfalls 1 zurück.

Der Dateizeiger muss gültig sein und auf eine Datei zeigen, die zuvor erfolgreich durch fopen() geöffnet wurde.

Hinweis: Haben Sie eine Datei im Append-Modus ("a") geöffnet, werden unabhängig von der Dateiposition alle zu schreibenden Daten angehängt.

Siehe auch fseek() und ftell().



rmdir> <rename
Last updated: Fri, 30 Oct 2009
 
add a note add a note User Contributed Notes
rewind
MagicalTux at kinoko dot fr
27-Nov-2007 06:53
Note that rewind($fd) is exactly the same as fseek($fd, 0, SEEK_SET)

rewind() just moves the location inside the file to the beginning, nothing more. Check if your stream is "seekable" before planning to use fseek/rewind.
berndt at www dot michael - berndt dot de
05-May-2005 07:27
evan at ozhiker dot no_spam dot com
05-Aug-2004 03:56
As with fseek(), the rewind() function may not be used on file pointers returned by fopen() if they use the "http://" or "ftp://" formats.

rmdir> <rename
Last updated: Fri, 30 Oct 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites