Copy link to clipboard
Copied
Hello - My Web site has an application.cfm at the root. I want one sub-folder of my site to not refer to any settings in the application.cfm when files in that folder are loaded. Is that possible? Is there a way to sort of negate the application.cfm in a sub-folder of a site? Thanks very much...
Yup, put another application.cfm or application.cfc file into the subfolder, even an empty one.
A comment to explain why it is empty is nice touch.
The way this works is the the first application.cfm|cfc file that ColdFusion finds traversing up the file folder tree is the one that is used.
Copy link to clipboard
Copied
Yup, put another application.cfm or application.cfc file into the subfolder, even an empty one.
A comment to explain why it is empty is nice touch.
The way this works is the the first application.cfm|cfc file that ColdFusion finds traversing up the file folder tree is the one that is used.
Copy link to clipboard
Copied
"Dunno... that smells bad to me," he said vaguely, scratching his head.
He pushes a button on his iPod. "Danger, Will Robinson! Danger!" squawks the little box. He nods approvingly, and gives you a meaningful glance. "Avoid going at all, in directions that you might later regret."
Copy link to clipboard
Copied
You can put a blank OnRequestEnd.cfm in that directory as well, if you need to.
I agree with the notion of putting a comment in there to explain WHY you have a blank Application.cfm or OnRequestEnd.cfm, too.
Copy link to clipboard
Copied
You can put a blank OnRequestEnd.cfm in that directory as well, if you need to.
I agree with the notion of putting a comment in there to explain WHY you have a blank Application.cfm or OnRequestEnd.cfm, too.
I see no problem with having a "dummy" Application.cfm / Application.cfc but as you say, one should annotate why it's there. Same with any code which might cause a subsequent developer to ask "is this right?"
--
Adam
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more