[thelist] CF: Determining Account Root?
rudy
r937 at interlog.com
Sat Aug 18 17:27:17 CDT 2001
> What I want to do is to create a relative path where I can
> subtract d:\inetpub\wwwroot from GetCurrentTemplatePath().
> So how can I calculate what d:\inetpub\wwwroot would be?
hi frank
DISCLAIMER: i am not a server guy
i think you get that from cgi.cf_template_path
at least, that's the cgi parameter that shows me the path to my root
i found out about it by dumping all my cgi parameters
<tip type="cold fusion debugging">
add an "environment dump" feature to each of your cf pages
if you have a footer include file, add the following to it
<CFPARAM NAME="url.edump" DEFAULT="0">
<CFIF url.edump IS "1"
OR LCase(Left(url.edump,1)) IS "y">
<CFINCLUDE TEMPLATE="edump.txt">
</CFIF>
if you don't have a footer, you'll have to add the above to every page
where you want the environment dump to work
the way you trigger it is to add edump="1" or edump="YES" to the url of the
page whenever you want to see that page's environment
the edump include file should look like this --
<CFOUTPUT>
<h3>cgi parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<CFLOOP COLLECTION="#cgi#" ITEM="foo">
<tr><td>cgi.#foo# </td><td>#cgi[foo]# </td></tr>
</CFLOOP>
</table>
<h3>url parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<CFLOOP COLLECTION="#url#" ITEM="foo">
<tr><td>url.#foo# </td><td>#url[foo]# </td></tr>
</CFLOOP>
</table>
<h3>session parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<CFLOOP COLLECTION="#session#" ITEM="foo">
<tr><td>session.#foo# </td><td>#session[foo]# </td></tr>
</CFLOOP>
</table>
<h3>cookie parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<CFLOOP COLLECTION="#cookie#" ITEM="foo">
<tr><td>cookie.#foo# </td><td>#cookie[foo]# </td></tr>
</CFLOOP>
</table>
<h3>local variables</h3>
<!--
these have to be displayed individually
-->
</CFOUTPUT>
</tip>
rudy
More information about the thelist
mailing list