paths to cfcs have to be absolute wite createObject()  A pita for site
portability, eh?  There are ways around this.  You could create a CF
mapping called com to C:\Inetpub\wwwroot\com\.   Then place your CFCs
in there in teh 'Java way'
C:\Inetpub\wwwroot\com\domainname\app1\mycfc.cfc

Then all your CFC calls would be the same anywhere as com.domainname.app1.mycfc

I sometimes set an application scoped var application.rootdir and use
something like
<cfset toolsobj =
CreateObject("Component","#Replace(application.config.getAppRoot(),"/",".")#.pathtocfcs.inmy.app")
/>

Doug
On Mon, 14 Mar 2005 15:36:03 -0500, Jeff Small <[EMAIL PROTECTED]> wrote:
> Okay, so I've got a site on my localhost. I'm setting it up to use CFCs and
> I've got my CFC all created, and it's working locally perfectly.
> 
> The path is C:\Inetpub\wwwroot\MySite
> 
> I have the CFC in the root of my site, and it's called, let's say,
> "myCFC.cfc".
> 
> So in my page, I have the code that instantiates the object:
> 
> <cfset variables.myObject= createObject("component", "MySite.myCFC")>
> 
> ....and it works perfectly, like I said. I also have an admin section and
> it's path is C:\Inetpub\wwwroot\MySite\backend\ and my instantiation code
> works fine in there:
> 
> <cfset variables.myObject= createObject("component", "MySite.myCFC")>
> 
> However, now that I move it over to the live site to test it, it's not
> working. I "fixed" it, by changing my instantiation code (in all my root cfm
> files) to:
> <cfset variables.myObject= createObject("component", "myCFC")>
> 
> ....which now works...*except* for in the admin directory one directory
> lower. I haven't been able to get it to work any other way than just placing
> the CFC in that directory too. I know, I know...this is *stupid* and I'm not
> going to leave it for sure, but I'm trying to figure out how I make it work
> on the remote, live site just like it's working here, without having to
> change code whenever I move it.
> 
> What do I need to do to get it to work right?
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198698
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to