PrepAway - Latest Free Exam Questions & Answers

Which of the following code snippets writes the content of the source.txt to target.txt?

Which of the following code snippets writes the content of the source.txt to target.txt?

PrepAway - Latest Free Exam Questions & Answers

A.
file_put_contents(“target.txt”, fopen(“source.txt”, “r”));

B.
file_put_contents(“target.txt”, readfile(“source.txt”));

C.
file_put_contents(“target.txt”, join(file(“source.txt”), “”));

D.
file_put_contents(“target.txt”, file_get_contents(“source.txt”));

E.
$handle = fopen(“target.txt”, “w+”); fwrite($handle,
file_get_contents(“source.txt”)); fclose($handle);

One Comment on “Which of the following code snippets writes the content of the source.txt to target.txt?


Leave a Reply

Your email address will not be published. Required fields are marked *