• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

invoking a cffunction from a subdomain?

Explorer ,
Nov 23, 2007 Nov 23, 2007

Copy link to clipboard

Copied

Hello all,

I'm hoping this can be done and I'm just not sure how. I have a domain and subdomain for the admin of the website.
Say www.mysite.com and admin.mysite.com. On my server I have a main folder which contains a folder for the site (which the main domain is pointed to) and I have a folder for the admin (which the subdomain is pointed to.)

Main Folder > Website
Main Folder > Admin

Inside my admin folder I have a folder called globalFunctions with a number of cfc's which I am using cfinvoke to call.
Main Folder > Admin > globalFunctions

<cfinvoke component="globalFunctions.eComm" ....... />

What I want to do is call some of these cfc's from the website folder. However since cfinvoke targets from the root folder the domain is pointed to I'm unable to get one folder level up from the site folder. Is there any way to do this?

Thanks.
TOPICS
Advanced techniques

Views

259

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 23, 2007 Nov 23, 2007

Copy link to clipboard

Copied

LATEST
Michael,

I think this is possible with a CF mapping set up on the server. Because when you call a CFC, you call it by a path. Like mySite.admin.globalFunctions. There could be a CF mapping that points to say C:\websites\mySite\admin\globalFunctions. If you are using CF8, you can create mappings per application. Just define them in your Application.cfc.
You can use something like this in your Application.cfc: <cfset StructInsert(THIS.mappings, "globalFunctions", "c:\websites\mySite\admin\globalFunctions")>

I hope this is what you were looking for.

Johann

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation