close a file in PHP

Read a file

In this example we will see how to Open/Create a file in PHP and read it . To open/create a file in PHP fopen() is use . Syntax: fopen(filename,mode); This function takes 2 parameter to open/create a file  . If file exist then it will simply open it if not then…