array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'splfileobject.fflush.php', 1 => 'SplFileObject::fflush', 2 => 'Flushes the output to the file', ), 'up' => array ( 0 => 'class.splfileobject.php', 1 => 'SplFileObject', ), 'prev' => array ( 0 => 'splfileobject.eof.php', 1 => 'SplFileObject::eof', ), 'next' => array ( 0 => 'splfileobject.fgetc.php', 1 => 'SplFileObject::fgetc', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splfileobject/fflush.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
SplFileObject::fflush — Flushes the output to the file
Forces a write of all buffered output to the file.
Diese Funktion besitzt keine Parameter.
Beispiel #1 SplFileObject::fflush() example
<?php
$file = new SplFileObject('misc.txt', 'r+');
$file->rewind();
$file->fwrite("Foo");
$file->fflush();
$file->ftruncate($file->ftell());
?>