28
CFML Language Reference
CFCONTENT
Defines the MIME type returned by the current page. Optionally, allows you to specify
the name of a file to be returned with the page.
Note
The ColdFusion Server Basic security settings may prevent CFCONTENT
from executing. These settings are managed using the ColdFusion
Administrator Basic Security page. In order for CFCONTENT to execute,
it needs to be enabled on the Basic Security page. Please refer to
Administering ColdFusion Server for more information about securing
ColdFusion tags.
Syntax
<CFCONTENT TYPE="file_type"
DELETEFILE="Yes/No"
FILE="filename"
RESET="Yes/No">
TYPE
Required. Defines the File/ MIME content type returned by the current page.
DELETEFILE
Optional. Yes or No. Yes deletes the file after the download operation. Defaults to
No. This attribute only applies if you are specifying a file with the FILE attribute.
FILE
Optional. Denotes the name of the file being retrieved.
RESET
Optional. Yes or No. Yes discards any output that precedes the call to
CFCONTENT. No preserves the output that precedes the call. Defaults to Yes. The
RESET and FILE attributes are mutually exclusive. If you specify a file, the RESET
attribute has no effect. See Note.
Note
You should consider setting RESET to "No " if you are calling
CFCONTENT from a custom tag and do not want the tag to have the side
effect of discarding the current page whenever it is called from another
application or custom tag.
Example
<!--- This example shows the use of CFCONTENT to return the
contents of the CF Documentation page dynamically to the browser.
You may need to change the path and/or drive letter.
(graphics will not display) --->
<HTML>
<HEAD>
<TITLE>
CFCONTENT Example
</TITLE>
</HEAD>
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...