File operations in PHP
When we consider any real world application, File management is one of the most commonly used feature. It could be saving the file uploaded by user in appropriate folder, verifying the file type and file size, changing the file permissions, resizing image etc.
Php provides file management functions which we can use to accomplish such file operations in our applications.
We will go through various file functions available in php.
Opening a file
Php ‘fopen()’function is used to open a file. It returns a file resource or a pointer to a file specified in the parameter.