What will the file_get_contents() return?

Lan Anh

New member
What will the file_get_contents() return?
A. Server’s response
B. Errors
C. Exception
D. Client’s response
 
Answer: a
Explanation: The file_get_contents() is a PHP’s native function used to hit the URL and read the server’s response into
a variable $wpt_response:
Code:
$wpt_response = file_get_contents($wpt_url . $urls_to_benchmark[$x]);
This function is similar to file(), except that file_get_contents() returns the file in a string, starting at the specified offset up to maxlen bytes. On failure, file_get_contents() will return FALSE.
 

Tìm kiếm

Back
Top