欢迎您 本站地址:  
返回首页   返回编程教学   蜘蛛纸牌  见缝插针  复盘项目  碰撞音效  名人励志书籍  男生头像黑白  插件与扩展源码  稗官野史 

PHP rewind() 函数


PHP Filesystem 参考手册 完整的 PHP Filesystem 参考手册

定义和用法

rewind() 函数将文件指针的位置倒回文件的开头。

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

语法

rewind(file)

参数 描述
file 必需。规定已打开的文件。


实例

<?php
$file = fopen("test.txt","r");

//Change position of file pointer
fseek($file,"15");

//Set file pointer to 0
rewind($file);

fclose($file);
?>


PHP Filesystem 参考手册 完整的 PHP Filesystem 参考手册
小库提示

扫描下方二维码,访问手机版。