- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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
Advertisements
To Continue Learning Please Login
Login with Google