SplFileObject
PHP Manual

SplFileObject::fflush

(PHP 5 >= 5.1.0)

SplFileObject::fflushFlushes the output to the file

Описание

public boolean SplFileObject::fflush ( void )

Forces a write of all buffered output to the file.

Параметри

Тази функция няма параметри.

Връщани стойности

Връща TRUE при успех или FALSE при неуспех.

Примери

Example #1 SplFileObject::fflush example

<?php
$file 
= new SplFileObject('misc.txt''r+');
$file->rewind();
$file->fwrite("Foo");
$file->fflush();
$file->ftruncate($file->ftell());
?>

Вж. също


SplFileObject
PHP Manual