Copy link to clipboard
Copied
I'm trying to figure out how to use cfinvoke to call a cfc sitting in a subdirectory...
It's apache with userdir turned on (so each user that has a public_html directory in their homedir can have a site)
The resulting logical path looks something like this:
/~user/CFC/component.cfc
/~user/test.cfm
I don't know what to put in test.cfm for it to see component cfc... Usually we would have the CFC directory in document root, so I would just be able to put <cfinvoke component='cfc.component'> but that's not the case now...
Thanks
Copy link to clipboard
Copied
if /~user is effectively the web root for each user, then /CFC/component.cfc should work.
If not, try relative addresssing - ../CFC/component.cfc
Copy link to clipboard
Copied
Thanks for the response. Web root is still /. Each user just gets a subdirectory off web root when UserDir is enabled, so /CFC did not work... Neither did ../CFC/ unfortunately, not even ./CFC/
The only way I can make it work is if I put the .cfc in the same dir as the script, which is OK for now but will not be practical once I have a whole list of them.
Copy link to clipboard
Copied
Your OP is clearer in the light of day. For you specific example, CFC/component.cfc should work. For your long term plan, is it your intent for users to share cfc's?