I've been using CFCs (components) but I guess I've never tried to call them from another other than the top directory in my site's file structure. Now I'm trying to create an instance of a CFC from a subdirectory and I'm not sure how to do it. Here is an example of my file structure.
/index.cfm
/components/example.cfc
/subdir/myfile.cfm
From index.cfm I just use this:
<cfobject name="example" component="components.example">
But how do I do it from myfile.cfm? I've tried a few things but nothing's working. Thanks!
/index.cfm
/components/example.cfc
/subdir/myfile.cfm
From index.cfm I just use this:
<cfobject name="example" component="components.example">
But how do I do it from myfile.cfm? I've tried a few things but nothing's working. Thanks!