Friday, January 18, 2013

Re: Load different config file

I guess you could do something like:

bootstrap.php

$tld = strrchr($_SERVER['SERVER_NAME'], '.');
Configure::load('config' . $tld);

or with parse_url or regex.

Andras Kende
http://www.kende.com


On Jan 18, 2013, at 7:08 AM, MetZ <metz80@gmail.com> wrote:

> Hi..
>
> I am wondering the best approach to load different config files according to TLD?
>
> domain.TLD1
> domain.TLD2
> domain.TLD3
>
> config/config_TLD1.php
> config/config_TLD2.php
> config/config_TLD3.php
>
> Today I am using only the config_TLD1.php (loaded in bootstrap).
>
> Any suggestions?
>
> Thanks!
> -Tom
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate