PHP Doku:: Rewind the file to the first line - splfileobject.rewind.html
Aktuelle Suchanfrage: 21009b70229598c6a80eef8b45bf282b-imagecopyresampled jpg - 5 Treffer
  1 imagecopyresized
Kopieren und Ändern der Größe eines Bild-Teiles - function.imagecopyresized.html
  2 imagecopyresampled
Copy and resize part of an image with resampling - function.imagecopyresampled.html
  3 imagecopymergegray
Copy and merge part of an image with gray scale - function.imagecopymergegray.html
  4 Liste der Ressource-Typen
Liste der Ressource-Typen - resource.html
  5 Funktionsindex
Funktionsindex - indexes.html

Bisherige Suchanfragen: (6) anzeigen

Verlauf / Chronik / History: (8) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzSonstige GrunderweiterungenStandard PHP Library (SPL)DateibehandlungThe SplFileObject classSplFileObject::rewind

Ein Service von Reinhard Neidl - Webprogrammierung.

The SplFileObject class

<<SplFileObject::next

SplFileObject::seek>>

SplFileObject::rewind

(PHP 5 >= 5.1.0)

SplFileObject::rewindRewind the file to the first line

Beschreibung

public void SplFileObject::rewind ( void )

Rewinds the file back to the first line.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Fehler/Exceptions

Throws a RuntimeException if cannot be rewound.

Beispiele

Beispiel #1 SplFileObject::rewind() example

<?php
$file 
= new SplFileObject("misc.txt");

// Loop over whole file
foreach ($file as $line) { }

// Rewind to first line
$file->rewind();

// Output first line
echo $file->current();
?>

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)