Personally I have 4 variables defined in my application.cfm
Two are for HTTP addreses and two are for path to files:
<CFSET application.webRootDir = 
getDirectoryFromPath(getCurrentTemplatePath())>
<CFSET len = len(getBaseTemplatePath()) - len(application.webRootDir)>
<CFSET application.webRootUrl = left(cgi.script_name, 
len(cgi.script_name) - len)>
<CFSET application.HTTPRootURL = cgi.server_name & application.webRootURL>
<CFSET application.serverRootDir = listDeleteAt(application.webRootDir,
            listLen(application.webRootDir, "\"), "\") & "\">

 For instance, on my developing site, I get:

application.webRootUrl  /MyCustomer/
application.webRootDir  C:\inetsrv\wwwroot\MyCustomer\
application.serverRootDir       C:\inetsrv\wwwroot\
application.HTTPRootURL         localhost/MyCustomer/


On the production server it gives:

application.webRootUrl  /
application.webRootDir  D:\INETSRV\WEB\MyCustomer\
application.serverRootDir       D:\INETSRV\WEB\
application.HTTPRootURL         www.MyCustomer.com/


Using these variable whenever I need for whatever situation solves all 
the problems.
I also have a tool on the admin site that lists all these varables when 
I'm not sure which one I should use.

-- 
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239136
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to