House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

July 04, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Home / Groups / ColdFusion Talk (CF-Talk)

Chicken or Egg? Config File to Set Application Variables

Author:
Michael Dawson
07/26/2007 07:27 PM

For some reason, this post didn't make it through the mail system. >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? > >Thanks


Mailing Lists