-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Testing under CF 4.0.1:
File1.cfm:
<cfif False>
<Cfinclude template="File2.cfm">
</cfif>
File2.cfm:
<Cfmail from="MyEmail" to="MyEmail" subject="CFINCLUDE
Test">CFINCLUDED TEST!</cfmail>
File3.cfm:
<cfif False>
<Cfinclude template="ThisDoesntExist.cfm">
</cfif>
Running File1 does NOT cause any email to be sent. Running File3
does NOT cause an error to be thrown about a missing include.
So I'd say the interpreter is only including the file it it needs to
(which isn't what I would have anticipated, but....)
Hope that answers your question.
Best regards,
Zac Bedell
> take the following code:
>
> <cfif thisFlag>
> <cfinclude template="thisFile.cfm">
> </cfif>
>
> Will ColdFusion evaluate the expression first before it includes
> the file -OR- will it include the file before it evaluates the
> expression?
>
> in other words, does CF say "ok, thisFlag is false, so i
> won't evaluate
> what's in the include file" or will it say "before i look at
> this, i need to
> include everything first"?
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
Comment: Please use PGP!!!
iQA/AwUBOYmS7graVoMWBwRBEQLPoACg7U2IgyONzMKCaD3JxU7KQ3DEsGkAn0Wo
5/WzVTo6kiX114cwDAdoM4mq
=ZdKS
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.