fopen($file_doc,"r+"); opens a file for?
-
reading
-
writing
-
none of above
-
both of above
D
Correct answer
Explanation
The r+ mode in fopen() opens a file for both reading AND writing operations. The file pointer is placed at the beginning of the file, allowing you to read existing content and write new content. Options A (reading only) and B (writing only) are incomplete since r+ supports both operations.