Thanks Bert,

That sounds like a great idea to me.  The problem, of course, is deciding on
a standard(!!!) set of environment variables.

(Can it really be true that CF doesn't have an ENV scope hidden away, just
like CGI scope?  Your tag is cool, but it really shouldn't be necessary.)

Can anyone suggest a standard set of variables?  What do we really need?
Document-root, path-delimiter, Customtags directory... anything else?

Thanks again,
LBB


-----Original Message-----
From: Bert Dawson [mailto:[EMAIL PROTECTED]]

I've written a custom tag called whatserveristhis.cfm, which is customised
for each server, that sets request.thisserver to the name of the machine
eg on the dev box it says:
<cfset request.thisserver = "dev">

Then, in the file that sets server specific variables:

<cf_whatserveristhis>

<CFSWITCH EXPRESSION="#request.thisserver#">
    <CFCASE VALUE="live">
        <CFSET request.server.webroot   = "e:\www\myapp\">
    </CFCASE>
    <CFCASE VALUE="test">
        <CFSET request.server.webroot   = "d:\cf\myapp\">
    </CFCASE>
    <CFCASE VALUE="dev">
        <CFSET request.server.webroot   = "f:\www\myapp\cf\hr">
    </CFCASE>
    <CFCASE VALUE="other">
        <!--- do nought - the vars should be set in whatserveristhis.cfm on
any 'other' servers --->
    </CFCASE>
    <CFDEFAULTCASE>
        <blink><h1>warning warning - server not configured</h1></blink>
        <CFABORT>
    </CFDEFAULTCASE>
</CFSWITCH>

....


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to