

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
rewind() function in PHP
The rewind() function rewinds a file pointer. It moves it to the beginning of the file. It returns True on success or False on failure.
Syntax
rewind(file_pointer)
Parameters
file_pointer − It must point to a file opened by fopen()
Return
The rewind() function returns True on success or False on failure.
Example
$file_pointer = fopen("new.txt", "r"); // Position of the file pointer is changed fseek($file_pointer, "12"); // Setting the file pointer to the beginning of the file rewind($file_pointer); fclose($file_pointer);
Output
TRUE
- Related Questions & Answers
- fseek() vs rewind() in C
- file_exists() function in PHP
- basename( ) function in PHP
- chgrp()function in PHP
- chmod() function in PHP
- chown() function in PHP
- clearstatcache() function in PHP
- copy() function in PHP
- delete() function in PHP
- dirname()function in PHP
- disk_free_space() function in PHP
- disk_total_space() function in PHP
- diskfreespace() function in PHP
- fclose() function in PHP
- feof() function in PHP
Advertisements