CFINCLUDE tags are usually one of the first things processed by ColdFusion.
- The (text) contents of the included file(s) are all merged into the
calling (parent) file(s).
- The whole thing is scanned for blatant syntax and expression problems.
- The whole thing is (compiled and) run like a single class. *
So, as far as the engine (and Application.cfm) is concerned, it's just
one big file thing at that point.
CFINCLUDEs are a way to isolate often-repeated segments of code, perhaps
less used after the introduction of CFCOMPONENT and CFFUNCTION, but
still a great way to organize and make your scripts more readable.
Dedicated include files can be grouped and isolated in a directory that
no browser can access directly - if you want - because it's always the
finished parent (i.e. base template) that is subject to most security
tests, like those in Application.cfm, Application.cfc, htaccess, etc.
For example, you could create an "includes" directory with it's own
Application.cfm file - one containing nothing more than a CFABORT tag.
Everything in there must be included by a base template.
Do you have some more information on how you're using them, a little
sample maybe?
Al Holden
* Yes I know, blatant over-simplification on my part. Isn't CFINCLUDE
actually a pre-processor directive?
On 4/11/2010 1:30 PM, Skellington wrote:
Hello,
I was wondering if there was anything in OpenBD that could help me on
this. I would like to use a Application.cfm in a admin directory with
in my application to control access to the files with in it. Normally
this would not be a big issue but I'm using cfincludes to display to
content. And at this time it appears that when using a cfinclude the
Application.cfm is ignored.
Is there anything in OpenBD to help with this? Or do I have to put a
quick session variable check at the top of each page in the admin dir?
Thanks,
Charlie
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!