> I just set my variables in "Application.cfm" - one > Application.cfm for the > development box and one for the server. > Thanks, > Joe Kelly
Yea, that's fairly common also ... It has its advantages. The reason I use the <cfswitch> in the application.cfm and use the same file in both places is so that I don't accidentally upload an application.cfm from my dev box to my server and then suddenly have a live app that's not working, etc... And as an added bonus, if I make other changes to the application.cfm, I don't have to consider modifying multiple files. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 > ----- Original Message ----- > From: "S. Isaac Dealey" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, September 09, 2002 8:55 AM > Subject: Re: Localhost vs. Remotehost >> I do the same thing, although I use a switch case >> statement ... I never > know >> how many servers or demo versions might be demanded, so >> the switch case >> makes it easier to add or remove a set of variables for a >> given server. >> >> Isaac >> Certified Advanced ColdFusion 5 Developer >> >> www.turnkey.to >> 954-776-0046 >> >> > Here is what I do, the names have been changed to >> > protect >> > the innocent :) >> >> > <cfif cgi.server_name IS 'localhost'> >> > <cfset ds="DSNname> >> > <cfset phyRoot = >> > "C:\www\someDirectory\public_html"> >> > <cfset wwwRoot = "http://localhost/siteName"> >> > <cfset httpsRoot = >> > "http://localhost/siteName"> >> > <cfelse> >> > <cfset ds="DSNname> >> > <cfset phyRoot = >> > "e:\www\someDirectory\pubic_html"> >> > <cfset wwwRoot = "http://www.siteName.com"> >> > <cfset httpsRoot = "https://www.siteName.com"> >> > </cfif> >> >> >> >> > At 9/8/2002 10:50 AM, you wrote: >> >>Hi list, >> >> >> >>Is there some way of coding a statement in a CF file >> >>that >> >>says something like, >> >> >> >>"If I'm operating from localhost/127.0.0.1 then set >> >>use-value as X; >> >>otherwise, >> >>set use-value as Y." ?? >> >> >> >>I'm having a miserable time with the fact that much >> >>code >> >>is >> >>server-specific on >> >>my remotely hosted sites, and everything from my >> >>application security, to any >> >>cffile (etc.) tag, has to be coded differently in order >> >>for me to >> >>devel/test locally >> >>than remotely. I'm hoping for some way I can build in >> >>an >> >>option that will >> >>make >> >>it so I don't have to keep 'changing code, then >> >>changing >> >>it back' every >> >>time I >> >>need to look at a file locally that is already online. >> >> >> >>Regards, >> >>PJ >> >> >> >>~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >>Palyne Gaenir >> >>Science Horizon Web Media >> >>www.sciencehorizon.com >> >>[EMAIL PROTECTED] ------------------------------------------------------------------------- This email server is running an evaluation copy of the MailShield anti- spam software. Please contact your email administrator if you have any questions about this message. MailShield product info: www.mailshield.com ----------------------------------------------- To post, send email to [EMAIL PROTECTED] To subscribe / unsubscribe: http://www.dfwcfug.org
