execute

Aliases: 
  • exec
  •  
    Parameters:
    Name Type Required Default Hint
    file string true The file to execute

    Command Usage

    Executes a CFML file and outputs whatever the template outputs using cfoutput or the buffer.

    execute myFile.cfm
    You can also pass variables to the template by passing any number of additional parameters to this
    command.

    If you're using named parameters, they will be available by ${name} in the variables scope.
    variables.$foo, variables.$bum
    execute file=myFile.cfm foo=bar bum=baz
    If you're using positional parameters, they will be available as ${position} in the variables scope.
    variables.$1, variables.$2
    execute myFile.cfm bar baz