If you use <cfinclude> on a CFM the contents of the file will be processed and rendered by the CF engine rather than being read straight in. For instance, if your included page had the following information: <cfoutput> <cfloop from="1" to="5" index="I"> #i# </cfloop> </cfoutput>
Your <cfsavecontent> variable would contain the numbers 1 through 10. If you did <cffile> you would get the literal text contained in the file (the code itself). John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -----Original Message----- From: Johnny Le [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 21, 2005 10:29 AM To: CF-Talk Subject: cffile vs. cfsavecontent Hi, I noticed lately that a lot of people are using cfsavecontent instead of cffile, like this: <cfsavecontent variable="content"> <cfinclude template="pageToRead.cfm"> </cfsavecontent> vs. <cffile action="read" file="c:\web\pageToRead.cfm" variable="content"/> I would think cffile is more intuitive than cfsavecontent, and it is only one line to type. So are there real benefits to use cfsavecontent over cffile? I heard that cffile is slower than cfsavecontent. Is that the only reason? Johnny ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210105 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

