How Do I Use ColdFusion Components (CFCs)?
Print this Article
Comment on this Article
ColdFusion components (CFC) are files saved with the extension CFC. Like custom tags, CFCs encapsulate your code for use on other ColdFusion pages. However, CFCs have several advantages over custom tags, including:
- bundling many functions in one component
- defining properties that multiple methods can then share
- supporting more advanced "object oriented" techniques, like inheritance
- providing easy support for web services and Flash® Remoting MX
For more information about creating and using CFCs see Macromedia's livedocs.
For security reasons, we disable the CreateObject
function on Linux and Windows® IIS6 shared hosting accounts running ColdFusion 7. To call your CFC, use the <cfinvoke>
tag. For an example, click here.
We enable the CreateObject
function on Windows IIS 7 shared hosting accounts.
NOTE: Grid Hosting accounts do not support ColdFusion. To see if you're affected, click here.