|
|
Home / Groups / ColdFusion Talk (CF-Talk)
Chicken or Egg? Config File to Set Application Variables> I have structured my web site (CF8) so that my config > settings are outside of the web root such as this: > > C:\Components > C:\Config > C:\CustomTags > C:\WebSite > > I'm building the site at: http://acelinktest.evansville.edu/ > and will publish it to http://acelink.evansville.edu/. > > With the exception of the C:\Config folder, all other folders > will be published to the production site. The contents of > the C:\Config folder will contain site-specific information > such as the site name "AceLinkTest" vs "AceLink" and > different values for session and application timeouts. (The > test site will have shorter timeouts.) > > Now, I'm building the Application.cfc and can't figure out > the best way to set the Application variables such as: > > this.name = #appName#; > this.sessionTimeout = #sessionTimeout#; > this.mappings["CustomTags"] = #customTagsServerPath#; > > I want to use either an Include or Component (not wanting to > argue which is better), but I can't include a config.cfm file > if it's outside the web root since the mapping is not yet > created. I can't create the mapping because I can't read the > config.cfm file that is outside the web root. > > I want to keep the web site as dynamic as possible, regarding > server paths and URLs, and also keep a separate directory for > my site configuration. However, where do I get that first > bit of information that ties it all together? Use a relative reference to get to the parent directory or to siblings, etc. Obviously, something will have to be hard-coded - the relative location of the config file, or perhaps the name of the config file if you wanted to mimic the behavior of CF when it's looking for Application.cfc/cfm. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! This email has been processed by SmoothZap - www.smoothwall.net |
Mailing Lists
|
Latest Fusion Authority Articles
|