Copy link to clipboard
Copied
I am trying to create a folder in the webroot named "foldername" to contain all my sites cfc files. My problem is that on my computer, within the coldfusion wwwroot folder, I have many clients web sites within their own folders. I need to be able to keep my computer as the testing server and then the remote server as the actual live web site. The issue is that I have to invoke the compenent using a different location on the testing server vrs the remote live web site server. For example, the testing server is wwwroot/clientname/foldername/name.cfc whereas the shared hosting location is wwwroot/foldername/name.cfc.
Does anyone have any simple suggestion so that I dont have to rewrite all my files before I upload them and then rename them when I want to use the testing server vrs remote server or create a variable in the application.cfc to alter when using the different locations?
Thanks
Or use the ColdFusion mapping feature that was desined for just this purpose.
On you development machine create a mapping named "foldername" that points to wwwroot/clientname/foldername.
On you shared hosting create a mapping named "foldername" that points to wwwroot/foldername.
Then just call your cfcs with the path "foldername.name", CF will use the mapping unless there is a local path that matches thie pattern first.
OF course if you don't control the coldfusion configuration of your shared hosti
...Copy link to clipboard
Copied
Or use the ColdFusion mapping feature that was desined for just this purpose.
On you development machine create a mapping named "foldername" that points to wwwroot/clientname/foldername.
On you shared hosting create a mapping named "foldername" that points to wwwroot/foldername.
Then just call your cfcs with the path "foldername.name", CF will use the mapping unless there is a local path that matches thie pattern first.
OF course if you don't control the coldfusion configuration of your shared hosting, you may have to make a request to have such a mapping created. Any hosting provider wothy of the name will have a process to make such a request or some administration tool for you to do so yourself.
Copy link to clipboard
Copied
Thank you, I think the solution is a little easier..hopefully. I can just map my development machine because on the shared hosting the folder will be directly off the root which is how it is writtin in the cfinvoke.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now