PHP fflush() 函數


PHP Filesystem 參考手冊 完整的 PHP Filesystem 參考手冊

定義和用法

fflush() 函數向打開的檔寫入所有的緩衝輸出。

如果成功則返回 TRUE,如果失敗則返回 FALSE。

語法

fflush(file)

參數 描述
file 必需。規定要檢查的打開檔流。


實例

<?php
$file = fopen("test.txt","r+");
// some code
fflush($file);
?>


PHP Filesystem 參考手冊 完整的 PHP Filesystem 參考手冊