Reply
Coldfusion component question
Old 02-25-2008, 11:54 PM Coldfusion component question
Novice Talker

Posts: 6
hey guys, I'm trying to access a component that's in a previous folder, but ../ doesn't seem to work. any ideas?

the component is in folder /root/components, and i'm invoking from /root/demo and going back a folder doesnt work (can't start the component with a dot).

any ideas?

thanks!
iliketocode is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 02-27-2008, 03:59 PM Re: Coldfusion component question
chrishirst's Avatar
Super Moderator

Posts: 11,713
Location: Blackpool. UK
use root relative and start the path with "/"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-29-2008, 02:27 PM Re: Coldfusion component question
angele803's Avatar
Perfectly Imperfect

Posts: 1,474
Name: Stephanie
Location: Oklahoma
are you trying to use an include? From my experience, you can't use relative paths with coldfusion includes.
angele803 is offline
Reply With Quote
View Public Profile
 
Old 03-01-2008, 10:10 AM Re: Coldfusion component question
svirid's Avatar
Average Talker

Posts: 24
Name: Dima
Location: Toronto, Canada
U must use abs path to component, no includes, send your script I will try to help.
svirid is offline
Reply With Quote
View Public Profile Visit svirid's homepage!
 
Old 03-06-2008, 04:31 PM Re: Coldfusion component question
Novice Talker

Posts: 6
Hey I figured it out. I added a variable to application.cfm relative to the root, and went from there to link the component.

and yes, you can use relative paths with <cfinclude>

The problem was that directories are separated by dots instead of slashes when calling coldfusion component so having 2 dots in a row (../) would cause an error.

thanks for the replies!
iliketocode is offline
Reply With Quote
View Public Profile
 
Old 06-06-2008, 12:02 PM Re: Coldfusion component question
Average Talker

Posts: 20
components are relative to the root
__________________
CFProject
jonnyshaw is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Coldfusion component question
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12188 seconds with 13 queries