The rewind() function rewinds the file pointer to the beginning of the file.
If successful, the function returns TRUE. If it fails, returns FALSE.
rewind(file)
parameter | describe |
---|---|
file | Required. Specifies an open file. |
<?php$file = fopen("test.txt","r");//Change position of file pointerfseek($file,"15");//Set file pointer to 0rewind($file);fclose($ file);?>