1 Replies - 5417 Views - Last Post: 20 August 2012 - 08:23 AM Rate Topic: -----

#1 cmaso  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-August 12

expandPath() and application root

Posted 15 August 2012 - 06:51 PM

Hi, I'm running CF8 with IIS. Two different websites on the same server. With one, when I output "expandPath('/')", I get "E:\web\www\htdocs". I look in IIS, and sure enough that's listed as the home directory for that site, and it's also where the application.cfm is located for that site. However, my other site has "E:\web\xophe" as the home directory in IIS, and "expandPath('/')" outputs "E:\Coldfusion8\wwwroot".

I've researched the function online, but haven't found any helpful info, other than some people report a bug in expandPath() using CF8. Just so I understand clearly, what exactly is expandPath("/") supposed to be outputting? If the app's root directory, when and where exactly was the value of this root directory set, and was it set by human hands? Not in CF Admin, not in IIS, not in application.cfm, and nowhere else I can readily find. My 2nd site leaves me very confused; no part of that site is to be found in E:\Coldfusion8\wwwroot. It's all in E:\web\xophe. I never set that to be the root directory, as far as I know. Thanks much for any light you can shed...

-CM

Is This A Good Question/Topic? 0
  • +

Replies To: expandPath() and application root

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1919
  • View blog
  • Posts: 3,461
  • Joined: 13-January 08

Re: expandPath() and application root

Posted 20 August 2012 - 08:23 AM

Hi cmaso and welcome to DIC!

Here is a fine explanation for the ExpandPath() function. Essentially, what it does is provides you with a path equivalent to the page you're calling the function from. Kind of like asking for the current path depending on the URL you're on.

It's not "set" per se by anything. It's a CF system function and not a variable so it's not the kind of thing you can manually set as it changes depending upon where you call it from.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1