PHP File Handling plays a great role in any web application. Regularly in each and every web application a file can be opened using fopen() and will close the opened files using fclose().
PHP File Manipulation
Different operations in file handling are performed by creating, reading, editing and uploading the files.
Proper checking is required when working on file manipulations. It is important to check the creation of file and at the time of editing the file. Sometimes improperly editing files leads to loss of the secured data.
PHP readfile() Function
Using PHP readfile() function, only read permission can be given to the users.They cannot edit or update the file.
[php]Hello!! This is SPLessons PHP tutorial.
You are reading PHP readfile() function example.[/php]
File is collection of data.
Opening, closing, writing, reading,deleting and renaming are the functions performed on file.