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.
|Published (Last):||14 January 2011|
|PDF File Size:||19.31 Mb|
|ePub File Size:||19.90 Mb|
|Price:||Free* [*Free Regsitration Required]|
This tag executes only if it is enabled in the ColdFusion Administrator. The content type determines how the coldfuzion or client interprets the page contents.
Adobe ColdFusion * cfcontent
The following are some of the content type values you can use include: When using ColdFusion in a colldfusion configuration, the 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 is sent to the client.
If you specify a file, this attribute has no effect. In this case all output is sent with the specified type. To set the character encoding character set of generated output, use code such as the following:.
You can use the cfcontent tag to override the default character encoding of the response. Xoldfusion example, to specify the character encoding of the page output as Japanese EUC, use the type attribute, as follows:.
If a file delete operation is unsuccessful, Cfcontenh throws an error. If you use this tag after the cfflush tag on a page, ColdFusion throws an error.
The following tag can force most browsers to display a dialog that asks users whether they want to save the contents of the file specified by the cfcontent tag as a with the filename specified by the filename value. For many file types, such as Excel documents, that Internet Explorer can display directly in the browser, the browser displays the file without asking users whether to save it if you use a cfheader tag similar to the following:.
Coldfuusion more information on character encodings, see the following web pages:. For a complete list of media types used on the Internet, see www. The MIME content type of the page, optionally followed by a semicolon and the character encoding.
Applies only if you specify a file with the file attribute. Name of file whose contents will be the page output. The reset and file attributes are mutually exclusive.