Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Question...I think

Status
Not open for further replies.

Westond

Programmer
Jan 19, 2005
43
US
I have a large site that and i use a application variable that has the root defined in it so I can use code like #application.root#/images/mypic.jpg. What I want is to make the root variable dynamic so the site can be placed under any folder structure and still work. I dont think I can use application variable bc it will reset every time.

This is what I am thinking:
<cflock ....>
<cfparam name="session.root" default="However you get root">
</cflock>

I dont think I can use expandpath because it contains the drive letter.

thanks for any help

Wes
 
The cgi.PATH_INFO might be what you want. However, it still contains the cfm which calls it.

A workaround like this may solve the problem:
Code:
<!-- If the cfm name is [blue]index.cfm[/blue] -->
<cflock ....>
<cfparam name="session.root" default="#replace(cgi.PATH_INFO,'[blue]index.cfm[/blue]','')#>
</cflock>

Regards,
mansii
 
is this to save files or to use it in html? you're talking about 2 different roots.



We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top