nerdexam
Adobe

9A0-127 · Question #68

A file name data.txt is stored in the same directory as the currently executing CFM page. What is the correct syntax to read the contents of the file into a variable named content?

The correct answer is C. <cffile action="read" file="#expandPath('data.txt')#" variable="content">. See the full explanation below for the reasoning.

Question

A file name data.txt is stored in the same directory as the currently executing CFM page. What is the correct syntax to read the contents of the file into a variable named content?

Options

  • A<cffile action="read" file="'data.txt#" variable="content">
  • B<cffile action="read" file="/appFolder/data.txt" variable="content">
  • C<cffile action="read" file="#expandPath('data.txt')#" variable="content">
  • D<cffile action="read" file="#expandPath(data.txt)#" variable="content">

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    75% (24)
  • D
    16% (5)

Community Discussion

No community discussion yet for this question.

Full 9A0-127 Practice