On Wednesday, Jan 8, 2003, at 07:54 US/Pacific, Jesse Houwing wrote:
> <cfif not StructKeyExists(request.included, attributes.template)>
>     <cfif >
>         <br> including: #attributes.template#
>     </cfoutput>
>     <cfinclude template="#attributes.template#" />
>     <cfset request.included[#attributes.template#]=true />
> </cfif>
> <!--- end include_once.cfm --->
>
> Tested and verified it. There is one small problem though, I found that
> if you include a file into itself the Coldfusion service immidiately
> restarts. This should not happen, but I haven't been able to prevent 
> it.

I think that's because your code would generate an infinite loop. Swap 
the cfinclude and the cfset lines above and that should fix it.

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim/iChat: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.macromedia.com/go/arch_blog

ColdFusion MX and JRun 4 now available for Mac OS X!
http://www.macromedia.com/macromedia/proom/pr/2003/jrun_osx.html

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to