armanbena
asked on
cfinclude with relative path driving me nuts!!
Hi,
I am trying to set a relative path to the current file and it is not working. I'm not sure what is wrong.
Page I am on: simple_example.cfm
\\server21\file\Editor\OBI _Status_Ch eck-MA\Xin ha\example s\simple_e xample.cfm
trying to get to file:
\\server21\store\team\char t\type\fil e.cfm
This is what I have:
<cfinclude template="../../../../stor e/team/cha rt/type/fi le.cfm">
But get an error.
What am I doing wrong??????
I am trying to set a relative path to the current file and it is not working. I'm not sure what is wrong.
Page I am on: simple_example.cfm
\\server21\file\Editor\OBI
trying to get to file:
\\server21\store\team\char
This is what I have:
<cfinclude template="../../../../stor
But get an error.
What am I doing wrong??????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I agree, looks as if the two files are on different shares which won't work. You can access both from your computer but the webserver can't see outside the root directory. Like dgraphx said
For any particular reason, if you have to keep out of the web root folder, you can always define the virtual directory mapping.
You can do the virtual directory mapping, with webserver config.
The mechanics of virtual directory mapping will depend on the platform (windows/linux) and web server (IIS/apache)
You can also do this with Coldfusion.
Look at the post by Ray and Ben
http://www.raymondcamden.com/index.cfm/2009/8/2/ColdFusion-9-Virtual-File-System-for-your-Application
http://www.bennadel.com/blog/1651-Learning-ColdFusion-9-Virtual-File-System-vs-Actual-File-System.htm
You can do the virtual directory mapping, with webserver config.
The mechanics of virtual directory mapping will depend on the platform (windows/linux) and web server (IIS/apache)
You can also do this with Coldfusion.
Look at the post by Ray and Ben
http://www.raymondcamden.com/index.cfm/2009/8/2/ColdFusion-9-Virtual-File-System-for-your-Application
http://www.bennadel.com/blog/1651-Learning-ColdFusion-9-Virtual-File-System-vs-Actual-File-System.htm