ColdFusion will search all the way up to the root of the hard drive until it either finds an Application.cfm or not.

As Kay says it's prolly a good practice, if not you're not already using an Application.cfm, to have a dummy Application.cfm file at an appropriate location within the server/site's directory structure to prevent ColdFusion from accidentally including an Application.cfm at a higher location.

I'm not sure if it's still the case with the current version, but ColdFusion used to throw an error if Application.cfm was zero bytes in size - because of this I always recommend that if you're going to create a dummy Application.cfm you're best to include a comment in the page so that the next developer knows what you've been up to.

As Kay says ColdFusion will check for an OnRequestEnd.cfm if it finds an Application.cfm, it will only look for it in the directory that it's found the Application.cfm and not do a search through the drive directory structure as it would for Application.cfm.

There's a couple of good reasons for using OnRequestEnd, either as a method of running a custom roll your own debug at the end of each page or perhaps as a tidy up process at the end of each page execution.

Like Application.cfm the considered best practice is not to have any HTML markup in OnRequestEnd.cfm, even plain text, as that will be implicitly included at the very end of a page - potentially after the markup of the page in an area that may not be rendered by the browser.

Andrew

Kay Smoljak wrote:
I've heard people recommend putting an empty Application.cfm file in a
directory to prevent CF wasting time wandering up the tree looking for
one, but as I understand it an OnRequestEnd template only gets
executed when found in the same directory as an Application.cfm
template, so there'd be no reason to have blank ones. Maybe the
previous developer either misunderstood that, or prehaps had code in
there at one point which was subsequently removed.

K.

--

Andrew Muller
Partner

RocketBoots Pty Limited
Professional Services for Macromedia Technologies

http://www.rocketboots.com.au

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to