Read file using PHP

File can read using fread() and fscanf() in PHP. fread() reads up to length bytes from the file pointer referenced by handle. Where fscanf() takes input from a file associated with handle and interprets the input according to the specified format. 

Click here for read file using PHP example