Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which one of the following function is capable of reading a file into a string variable?

a) file_contents()
b) file_get_contents()
c) file_content()
d) file_get_content()

Answer: b
Explanation: The function file_get_contents() reads a file into a string. This is the preferred way to read the contents of a file into a string as it will use memory mapping techniques.

Join The Discussion