Thanks Simon,

I was arriving at this conclustion myself.

I guess I'd use $_SERVER(http_host) to select $useDbConfig in the app
model, and set a default files path in app controller.

Managing the whole thing from a "root" user controll panel might be
tricky. Unless when loged in as root you could pass relevant database
selector via a url to the app model.

Does this all  make sense, or could I be missing a better solution?

TWIOF

On Apr 2, 10:28 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Another thing we use here is dirty hack includes in config files:
>
> This is my standard database.php file:
> <?php
> switch (strtolower($_SERVER['SERVER_NAME'])) {
>     case 'site.local':
>     case 'site':
>         include APP . DS . 'config' . DS . 'database_local.php';
>         break;
>     case 'test.site.example.com':
>         include APP . DS . 'config' . DS . 'database_test.php';
>         break;
>     default:
>         include APP . DS . 'config' . DS . 'database_live.php';
>         break;}
>
> ?>
>
> Which we use to save having to mess about with config on deployment. A
> similar solution would work for TWIOF's case, and may be the simplest
> option.
>
> Simonhttp://www.simonellistonball.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to