echo
While writeOutput writes to the page-output stream, this function writes to the main response buffer
echo(string) → returns boolean
Argument Reference
string string Required
String to be written to the output buffer
Examples Sample code invoking the echo function
Prints a simple string.
echo("hello world"); Expected Result: hello world
Note that complex objects will not automatically be converted to String, as with System.out.println in Java.
// Create data
data = {
"title" : "A Game of Thrones",
"author" : "George R. R. Martin",
"ISBN" : "0-00-224584-1"
};
// Print data
echo(data.toString()); Expected Result: {ISBN={0-00-224584-1}, author={George R. R. Martin}, title={A Game of Thrones}}
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/echo