时间:2021-07-01 10:21:17 帮助过:5人阅读

php rewind()函数 语法
作用:将文件指针的位置倒回文件的开头。
语法:
rewind(file)
参数:
file 必需。规定已打开的文件。
说明:若成功,则返回 true。若失败,则返回 false。
php rewind()函数 示例
<?php
$file = fopen("./test.txt","r");
//改变文件指针的位置
fseek($file,"13");
//把文件指针设定为 0
rewind($file);
//输出指针位置
echo ftell($file);
?>本篇文章就是关于PHP rewind函数的介绍,希望对需要的朋友有所帮助!
以上就是rewind函数怎么用的详细内容,更多请关注Gxl网其它相关文章!