Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Rechercher une fonction PHP

The SplFileObject class

(PHP 5 >= 5.1.0, PHP 7)

Introduction

The SplFileObject class offers an object oriented interface for a file.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Class synopsis

SplFileObject extends SplFileInfo implements RecursiveIterator , SeekableIterator {
/* Constants */
const integer DROP_NEW_LINE = 1 ;
const integer READ_AHEAD = 2 ;
const integer SKIP_EMPTY = 4 ;
const integer READ_CSV = 8 ;
/* Methods */
public __construct ( string $filename [, string $open_mode = "r" [, bool $use_include_path = FALSE [, resource $context ]]] )
public current ( void ) : string|array
public eof ( void ) : bool
public fflush ( void ) : bool
public fgetc ( void ) : string
public fgetcsv ([ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\" ]]] ) : array
public fgets ( void ) : string
public fgetss ([ string $allowable_tags ] ) : string
public flock ( int $operation [, int &$wouldblock ] ) : bool
public fpassthru ( void ) : int
public fputcsv ( array $fields [, string $delimiter = "," [, string $enclosure = '"' [, string $escape = "\\" ]]] ) : int
public fread ( int $length ) : string
public fscanf ( string $format [, mixed &$... ] ) : mixed
public fseek ( int $offset [, int $whence = SEEK_SET ] ) : int
public fstat ( void ) : array
public ftell ( void ) : int
public ftruncate ( int $size ) : bool
public fwrite ( string $str [, int $length ] ) : int
public getChildren ( void ) : void
public getCsvControl ( void ) : array
public getFlags ( void ) : int
public getMaxLineLen ( void ) : int
public hasChildren ( void ) : bool
public key ( void ) : int
public next ( void ) : void
public rewind ( void ) : void
public seek ( int $line_pos ) : void
public setCsvControl ([ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\" ]]] ) : void
public setFlags ( int $flags ) : void
public setMaxLineLen ( int $max_len ) : void
public valid ( void ) : bool
/* Inherited methods */
public SplFileInfo::getATime ( void ) : int
public SplFileInfo::getBasename ([ string $suffix ] ) : string
public SplFileInfo::getCTime ( void ) : int
public SplFileInfo::getExtension ( void ) : string
public SplFileInfo::getFileInfo ([ string $class_name ] ) : SplFileInfo
public SplFileInfo::getFilename ( void ) : string
public SplFileInfo::getGroup ( void ) : int
public SplFileInfo::getInode ( void ) : int
public SplFileInfo::getLinkTarget ( void ) : string
public SplFileInfo::getMTime ( void ) : int
public SplFileInfo::getOwner ( void ) : int
public SplFileInfo::getPath ( void ) : string
public SplFileInfo::getPathInfo ([ string $class_name ] ) : SplFileInfo
public SplFileInfo::getPathname ( void ) : string
public SplFileInfo::getPerms ( void ) : int
public SplFileInfo::getRealPath ( void ) : string
public SplFileInfo::getSize ( void ) : int
public SplFileInfo::getType ( void ) : string
public SplFileInfo::isDir ( void ) : bool
public SplFileInfo::isExecutable ( void ) : bool
public SplFileInfo::isFile ( void ) : bool
public SplFileInfo::isLink ( void ) : bool
public SplFileInfo::isReadable ( void ) : bool
public SplFileInfo::isWritable ( void ) : bool
public SplFileInfo::openFile ([ string $open_mode = "r" [, bool $use_include_path = FALSE [, resource $context = NULL ]]] ) : SplFileObject
public SplFileInfo::setFileClass ([ string $class_name = "SplFileObject" ] ) : void
public SplFileInfo::setInfoClass ([ string $class_name = "SplFileInfo" ] ) : void
public SplFileInfo::__toString ( void ) : string
}

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Predefined Constants

SplFileObject::DROP_NEW_LINE

Drop newlines at the end of a line.

SplFileObject::READ_AHEAD

Read on rewind/next.

SplFileObject::SKIP_EMPTY

Skips empty lines in the file. This requires the READ_AHEAD flag be enabled, to work as expected.

SplFileObject::READ_CSV

Read lines as CSV rows.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Changelog

Version Description
5.3.9 SplFileObject::SKIP_EMPTY value changed to 4. Previously, value was 6.

Eerste pagina van Manuel PHP  Inhoudsopgave Haut

Table of Contents

Zoek een PHP-functie

Vertaling niet beschikbaar

De PHP-handleiding is nog niet in het Nederlands vertaald, dus het scherm is in het Engels. Als u wilt, kunt u het ook in het Frans of in het Duits raadplegen.

Als je de moed voelt, kun je je vertaling aanbieden ;-)

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 30/01/2003 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/php-rf-class.splfileobject.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : http://php.net

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut