Thanks Barney, Al, & Chris

On 4/3/2003 5:11 PM, Barney Boisvert <[EMAIL PROTECTED]> wrote:
>This is somewhat off topic, but if you don't want to put settings 
>like this
>in every directory's Application.cfm, just set up your Application.cfm 
>files
>to cascade.  Then you can abstract things up to a single place:
>
>/Application.cfm
>----------------
><cfset request.dsn = "asdf" />
><cfif cgi.remote_addr EQ "1.1.1.1">
>       <cfset path = "dev/" />
><cfelse>
>       <cfset path = "prod/" />
></cfif>
><!--- global application variables --->
>
>/users/Application.cfm
>----------------------
><cfinclude template="../Application.cfm" />
><!--- user directory specific app variables --->
>
>/products/Application.cfm
>-------------------------
><cfinclude template="../Application.cfm" />
><cfset request.catalog_dsn = "whatever" />
>
>/products/order/Application.cfm
>-------------------------
><cfinclude template="../Application.cfm" />
><cfset request.payment_gateway = "1.1.1.2" />
>
>
>
>---
>Barney Boisvert, Senior Development Engineer
>AudienceCentral (formerly PIER System, Inc.)
>[EMAIL PROTECTED]
>voice : 360.756.8080 x12
>fax   : 360.647.5351
>
>www.audiencecentral.com
>
>> -----Original Message-----
>> From: Al Musella, DPM [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, April 03, 2003 2:03 PM
>> To: CF-Talk
>> Subject: Re: CF Server Mappings
>>
>>
>>    What I do is set a variable in the application.cfm called
>> path, and then
>> whereever you need a mapping, just use:
>>   #path#
>> for example, instead of dev/images
>> you set #path#  = 'dev/'
>> then call:
>> #path#images
>>
>> I actually use a little conditional logic in the application.cfm 
>to
>> automate it.. I set the path depending on the ip address of the
>> host.  This
>> way I can move it from my development machine to the server, which 
>has a
>> different directory structure, but the conditional logic is just
>> in 1 place
>> (per directory), not all over the place.
>>
>> Al
>>
>> At 09:25 AM 4/3/2003, Matt Kornguth wrote:
>> >Think the answer to this is "No", but worth a try:
>> >
>> >We recently moved our development and staging sites onto the
>> same physical
>> >server running CF 5.0. We are running into the situation where 
>our CF
>> >server mappings are pointing to specific directories on EITHER 
>dev or
>> >staging. So, when working on dev, we may have to change a file
>> in a mapped
>> >directory on staging ... or vice versa.
>> >
>> >Anyone know of a way (without conditional coding) to have the
>> same server
>> >mapping point to the correct mapped directory (i.e. dev when on 
>dev,
>> >staging when on staging)? I know multiple instances of CF are
>> not possible
>> >with 5.0, so any thoughts?
>> >
>> >Hope I conveyed the problem OK. Thanks for your help,
>> >Matt Kornguth
>> >BLR.com
>>
>> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to