PHP fflush() 函式
❮ PHP 檔案系統參考示例
將所有緩衝的輸出寫入開啟的檔案
<?php
$file = fopen("test.txt","r+");
rewind($file);
fwrite($file, 'Hello World');
fflush($file);
fclose($file);
?>
定義和用法
fflush() 函式將所有緩衝的輸出寫入開啟的檔案。
語法
fflush(file)
引數值
引數 | 描述 |
---|---|
file | 必需。指定要寫入緩衝輸出的開啟檔案 |
技術詳情
返回值 | 成功時為 TRUE,失敗時為 FALSE |
---|---|
PHP 版本 | 4.0.1+ |
❮ PHP 檔案系統參考