cfcontent deleteFile = “yes|no” file = “filename” reset = “yes|no” type = “file type” variable Previously, ColdFusion assumed a default file type of text/html. Now. Note: This tag executes only if it is enabled in the ColdFusion Administrator. cfcontent type = “file_type” deleteFile = “Yes” or “No” file = “filename” reset. If you haven’t used ColdFusion’s CFContent tag to stream data to the browser, either as an inline object, or as an attachment, you should at.

Author: Dishura Akinozilkree
Country: Guadeloupe
Language: English (Spanish)
Genre: Sex
Published (Last): 4 June 2004
Pages: 340
PDF File Size: 10.42 Mb
ePub File Size: 7.34 Mb
ISBN: 310-9-34224-152-1
Downloads: 59446
Price: Free* [*Free Regsitration Required]
Uploader: Shakagar

Configuring and Administering Adobe ColdFusion 9. Developing Adobe ColdFusion 9 Applications. Sets the MIME content encoding header for the current page; if the encoding information includes a character encoding, sets the character encoding of generated output. For more information, see the Administrator online Help.

Changed the behavior of the tag if the type attribute is not specified and the file attribute is specified.

Using cfcontent

Now, ColdFusion attempts to get the content type from the file. Name of an on-disk or in-memory file whose contents provide the page output. The filename must start with a drive letter and a colon, or a forward or backward slash. When using ColdFusion in a distributed configuration, coldufsion file attribute must refer to a path on the system on which the web server runs. When you use this attribute, any other output on the current CFML page is ignored; only the contents of the file are sent to the client.

If you specify a file or variable attribute, this attribute has no effect; otherwise, it does the following:.

In this case, all output is sent with the specified type. The MIME content type of the page, optionally followed by a semicolon and the character encoding.

However, if the file attribute is specified, ColdFusion attempts to get the content type from the file. To set the character encoding character set of generated output, including the page HTML, use code such as the following:.

  LA NUOVA ATLANTIDE DI BACONE PDF

ColdFusion Help | Using cfcontent

You can use the cfcontent tag to override the default character encoding of the response. For example, to tell ColdFusion to return the page using Japanese EUC character encoding, use the type attribute, as follows:. Do not use this tag after the cfflush tag on a page, it has no effect or ColdFusion throws an error.

The following tag can force most browsers to display a dialog box that asks users whether they want to save the contents of the file specified by the cfcontent tag using the filename specified by the filename value. If the user selects to open the file, most browsers open the file in the related application, not the browser window.

Some file types, such as PDF documents, do not use executable code and can display directly in most browsers. To request the browser to display the file directly, use a cfheader tag similar to the following:.

cfcontent Code Examples and CFML Documentation

You can use any value for the filename part of the filename attribute, but the ext part must be the standard Windows extension for the file type. For file types that might contain executable code, such as Microsoft Excel documents, most browsers always ask before opening the document. For these file types, the inline content disposition specification requests the browser to display the file directly if the user selects to open the file.

The page at www. The page at http: This list uses Java internal names, not the IANA character encoding names that you use in the SetEncoding charset parameter and other ColdFusion attributes and parameters.

For a complete list of media types used on the Internet, see www. View Help PDF adobe. Description Does either or both of the following: Sends the contents of a file, or of a variable that contains binary data, as the page output. Category Coldfusioon output tags. See also cfcolcfheadercfhttpcfoutputcftable.

  23 TAGE ISAIS PDF

Added the variable attribute. Usage To set the character encoding character set of generated output, including the page HTML, use code such as the following: For example, to tell ColdFusion to return the page using Cfconttent EUC character encoding, use the type attribute, as follows: If a file delete operation is unsuccessful, ColdFusion throws an error.

To request the browser to display the file directly, use a cfheader tag similar to the following: For more information on character encodings, see the following web pages: Notice that the graphics do not display and the hyperlinks do not work, because the html page uses relative filename references.

The root of the reference is the ColdFusion page, not the location of the html page. The user is prompted with an option to save the file or open it in the browser. Excel interprets the table format. Because Excel can include executable code, the browser prompts the user whether to save the file or open it in a browser. See also cfcolcfheadercfhttpcfoutputcftable History ColdFusion 8: Applies only if you specify a file with the file coldusion.

If you specify a file or variable attribute, this attribute has no effect; otherwise, it does the following: The content type determines how the browser or client interprets the page contents.

The following are some of the content type values that you can use: