Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1 .Which file I/O function writes a data to a file in PHP? Select one: a. printf

ID: 3598938 • Letter: 1

Question

1.Which file I/O function writes a data to a file in PHP?

Select one:

a. printfile()

b. file()

c. file_write_contents()

d. file_put_contents()

e. file_get_contents()

2.In PHP file I/O what does the function file_get_contents() do?

Select one:

a. returns a single string with the entire contents of the file

b. checks to see if a file exists

c. writes data to a file

d. returns an array of strings where each string is a line in the file

3.In PHP, what would be the value of the variable $c?

Select one:

a. 4

b. yellow

c. 3

d. 5

Explanation / Answer

Question 1

Answer: d. file_put_contents()

Question 2

Answer: a. returns a single string with the entire contents of the file

Question 3

Answer: a. 4