Nice–Thanks!

On Nov 19, 11:07 pm, RyOnLife <[EMAIL PROTECTED]> wrote:
> Here's what I do:
>
> class DATABASE_CONFIG {
>
>         var $localhost = array(
>                 'driver' => 'mysql',
>                 'persistent' => false,
>                 'host' => '127.0.0.1',
>                 'login' => '',
>                 'password' => '',
>                 'database' => '',
>                 'prefix' => '',
>                 'encoding' => ''
>         );
>
>   var $prod = array(
>         'driver' => 'mysql',
>         'persistent' => false,
>         'host' => '',
>         'login' => '',
>         'password' => '',
>         'database' => '',
>         'prefix' => '',
>         'encoding' => ''
>   );
>
>   var $test = array(
>         'driver' => 'mysql',
>         'persistent' => false,
>         'host' => '',
>         'login' => '',
>         'password' => '',
>         'database' => '',
>         'prefix' => '',
>         'encoding' => ''
>   );
>
>   var $default = array();
>
>   function __construct() {
>     if([EMAIL PROTECTED]'SERVER_ADDR'] || @$_SERVER['SERVER_ADDR'] ==
> '127.0.0.1'):
>       $this->default = $this->localhost;
>     else:
>       $this->default = $this->prod;
>     endif;
>   }
>
>   function DATABASE_CONFIG() {
>     $this->__construct();
>   }
>
>
>
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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