Spec-Zone.ru › ColdFusion

echo

While writeOutput writes to the page-output stream, this function writes to the main response buffer

echo(string) → returns boolean

  • Lucee
  • BL 1.0.0+
  • See Also: writeOutput

    Argument Reference

    string string
    Required

    String to be written to the output buffer

    Examples
    Sample code invoking the echo function

    Simple Example

    Prints a simple string.

    echo("hello world");

    Expected Result: hello world

    Complex Data Example

    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

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API