House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 05, 2008

<<   <   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       

Search over 2,500 ColdFusion resources here  >>>      
Home / Groups / ColdFusion Talk (CF-Talk)

Chicken or Egg? Config File to Set Application Variables

Author:
James Holmes
07/26/2007 09:57 PM

You can't use cffile to read the config file? > 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? -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/


Mailing Lists