Which of the following functions retrieve the entire contents of a file in such a way that it can be used as part of an expression? (Choose 2)
[4736,4739]
Correct:
--> file_get_contents()
--> file()
Only the file_get_contents and file functions retrieve the entire contents of a file and, therefore, the correct answers are A and D. The readfile function does read the entire contents of a file, but sends them directly to the output buffer, thus making it impossible to use them in an expression (short of using output buffering to capture the file’s contents).