nerdexam
National_Instruments

200-500 · Question #85

Which of the following commands will append data to an existing file?

The correct answer is C. file_put_contents("file", "data", FILE_APPEND). See the full explanation below for the reasoning.

Question

Which of the following commands will append data to an existing file?

Options

  • Afile_put_contents("file", "data", "a");
  • Bfile_put_contents("file", "a", "data");
  • Cfile_put_contents("file", "data", FILE_APPEND);
  • Dfile_put_contents("file", "a", NULL, FILE_APPEND);

How the community answered

(35 responses)
  • A
    9% (3)
  • B
    14% (5)
  • C
    74% (26)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice