text/html; text/plain; application/msword; application/msexcel; application/poscript ; application/x-zip-compressed; application/pdf; application/rtf; video/x-msvideo. cfcontent type = “file_type” deleteFile = “Yes” or “No” file = “filename” reset = ” Yes” or text/html; text/plain; application/x-shockwave-flash; application/msword . systemHash=”> application/json”>
|Published (Last):||3 February 2010|
|PDF File Size:||10.13 Mb|
|ePub File Size:||13.31 Mb|
|Price:||Free* [*Free Regsitration Required]|
This tag executes only if it is enabled in the ColdFusion Administrator. The content type determines how the browser or client interprets the page contents.
The following are some of the content type values you can use include: When using ColdFusion in a distributed configuration, the file attribute must refer to a path on the system on which the web server runs. When you use this applicayion, any other output on the current CFML page is ignored; only the contents of the cfclntent 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.
ColdFusion Help | Using cfcontent
To cfcontrnt 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. For 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, ColdFusion 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 applicaion 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:.
For 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.