← 返回列表

PHP fflush() 函数

PHP fflush() 函数 定义和用法 fflush() 函数向打开的文件写入所有的缓冲输出。 如果成功则返回 TRUE,如果失败则返回 FALSE。 语法 fflush(file) 参数 描述 file 必需。规定要检查的打开文件流。 实例 <?php $file = fopen("test.txt","r+"); // some code fflush($file); ?>

PHP fflush() 函数


定义和用法

fflush() 函数向打开的文件写入所有的缓冲输出。

如果成功则返回 TRUE,如果失败则返回 FALSE。

语法

fflush(file)
参数 描述
file 必需。规定要检查的打开文件流。

实例

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

打开资源 ↗

交流与评论