How to read the file using PHP?
Here in PHP we have fgets() function which can be to read line in a file and feof() is used to check whether the end of file is reached or not.It will become more clear from the following example.
//Reading file in PHP
$file = fopen("text.txt","r");
This is PHP Programming.
This shows how to open a file and how to read a line from that file using PHP.
This file can be any text file.(with .txt extension).