[Solar-talk] constant in solar config array

Jeff Surgeson solar at 3hex.com
Sat Oct 27 07:45:14 CDT 2007


> > Can anyone give a reason why I should not use a constant in my
> > solar.config
> > array, for example:
>
> No reason at all.  :-)  In fact, I do just that kind of thing
> myself.  Sometimes I even use this ...
>
>      if ($_SERVER['SERVER_NAME'] == 'dev.example.com') {
>          include "development.config.php";
>      } else {
>          include "production.config.php";
>      }
>
> ... to make things *really* flexible.  Config files are scripts like
> anything else, so you should feel free to have normal PHP logic in
> them (as long as it's config-related logic).

Cheers Paul :-)

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the Solar-talk mailing list