Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What types of modes we use in PHP for File Handling?
 Some modes that we use in PHP are given below:
1.r :This perform only read operation and start at the beginning of file.
2.r+ :This perform both read and write operation and start at the beginning of file.
3.w :This perform only write operation.we can open and create the content of file.If file is not exist creates a new file.
4.w+ :This perform both read and write operation. we can open and create the content of file.If file is not exist creates a new file.
5.a :We can open and append the content of file.
If file is not exist creates a new file.
6.a+ :We can open,read and append the content of file.
7.x :This perform only write operation.Also create new files.It will show error or return False when file is already exist. 
8.x+ :This perform both read and write operation. Also create new files.It will show error or return False when file is already exist.