PHP中的fflush()函数
该fflush()函数将输出刷新到打开的文件。该函数强制将所有缓冲的输出写入文件句柄指向的资源。
语法
fflush(file_pointer)
参数
file_pointer-指定打开的文件流。
返回
该fflush()函数返回。
成功成功
失败时为假
示例
<?php
$file_pointer = fopen("one.txt","r+");
fflush($file_pointer);
?>输出结果
test line
让我们来看另一个例子。
示例
<?php
$file_pointer = fopen("two.txt", "r");
$res = fgets($file_pointer);
while(! feof($file_pointer))
fflush($check);
fclose($file_pointer);
?>输出结果
Java is a programming language. JavaScript is a scripting language.
热门推荐
10 新年门口花束祝福语简短
11 盘锦结婚祝福语大全简短
12 父母生日祝福语 简短独特
13 家庭恩爱祝福语简短英文
14 高考俄语祝福语大全简短
15 虎年祝福语 诗句唯美简短
16 生日婚礼祝福语简短精辟
17 虎年喝酒拜年祝福语简短
18 教师闺蜜祝福语简短