As long as there is no "\" mapping on the server.
You could use expand path, as long as you set it from a file that always
runs form the same path.
So if you have in your application.cfm in the root
<cfset root = expandpath('../application/config')>
This will go back one folder in into the application folder.
This will only work as long as the application.cfm is not executed from a
file in a sub-directory, otherwise the expantpath() will be relative to the
file that executed it.
In which case, you need to cfinclude a file that is in the root, and that
sets the expandpath value, so it will always go back one folder form the
root.
HTH
Russ
-----Original Message-----
From: Joe Ferraro [mailto:[EMAIL PROTECTED]
Sent: 15 February 2006 19:27
To: CF-Talk
Subject: Re: finding the base of the application
getBaseTemplatePath doesn't get me exactly what i need, but I found another
way to get what I want. Esentially I wanted to be able to load an XML from a
relative path that was below the webroot. Looking in the code for Tartan I
found the something to the affect of this.
<cfsavecontent variable="xml"><cfinclude
template="\application\config\config.xml" /></cfsavecontent>
This works really well and can be called from within a cfc regardless of
path context.
On 2/15/06, Snake <[EMAIL PROTECTED]> wrote:
>
> That will return the path of whatever file is currently being executed.
> I think you want GetBaseTemplatePath()
>
> Russ
>
> -----Original Message-----
> From: Nathan Strutz [mailto:[EMAIL PROTECTED]
> Sent: 15 February 2006 18:59
> To: CF-Talk
> Subject: Re: finding the base of the application
>
> You could try #expandPath("/")#
> It's not foolproof, but it should generally work.
>
> -nathan strutz
> http://www.dopefly.com/
>
> On 2/15/06, Joe Ferraro <[EMAIL PROTECTED]> wrote:
> > I'm trying to figure out good way to find the base of the
> > application, but I haven't come up with anything fool proof yet.
> >
> > lets say my application is
> >
> > C:\Inetpub\wwwroot\application\
> >
> > How can I find the C:\Inetpub\wwwroot\ ?
> >
> > Thanks,
> >
> > Joe
> >
> >
> >
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232389
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54