2081 7

BIT301 ยท 2081 ยท 5 marks

Write a PHP program to read a file.

Write a PHP program to read a file. [5]

Web Technology IIChapter 9: File Handling and Data FormatsFile reading operations

--- There are several ways to read a file in PHP. Below are the common approaches: --- --- --- --- Function Description ------ fopen($file, "r") Opens a file in read mode fgets($file) Reads one line from the file feof($file) Returns true if end of file is reached fclose($file) Closes the opened f...