PHP rewind
定义和用法PHP rewind() 函数将文件指针的位置倒回文件的开头。
若成功,则返回 true。若失败,则返回 false。
语法rewind(file)
参数
描述
file
必需。规定已打开的文件。
例子<?php
$file = fopen("test.txt","r");
//改变文件指针的位置 fseek($file,"15");
//把文件指针设定为 0 rewind($file);
fclose($file);
?>
PHP Filesystem 函数
定义和用法PHP rewind() 函数将文件指针的位置倒回文件的开头。
若成功,则返回 true。若失败,则返回 false。
语法rewind(file)
参数
描述
file
必需。规定已打开的文件。
例子<?php
$file = fopen("test.txt","r");
//改变文件指针的位置 fseek($file,"15");
//把文件指针设定为 0 rewind($file);
fclose($file);
?>
PHP Filesystem 函数