Rewind the position of the file pointer to the beginning of the file:
<?php
$file = fopen("test.txt","r");
//Change position of file pointer
fseek($file,"15");
//Set file pointer to 0
rewind($file);
fclose($file);
?>
The rewind() function "rewinds" the position of the file pointer to the beginning of the file.
rewind(
file)
Parameter | Description |
---|---|
file | Required. Specifies the open file |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!