Problem Statement
Which function is used to open a file in PHP?
Explanation
The fopen function opens a file in the specified mode such as read, write, or append. It returns a file handle used for further operations.
Code Solution
SolutionRead Only
fopen('data.txt','r');