Q. Which of the following is the correct way to open a file for writing in PHP?
β
Correct Answer: (A)
fopen('file.txt', 'w')
Explanation: fopen() opens a file with specified mode, 'w' for writing.