/var/www/(Del)gepgroup.hk/common/connection.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
require_once( realpath(dirname(__FILE__)) . '/../php-activerecord/ActiveRecord.php');
//$model_directory = realpath('../models');
$model_directory realpath(dirname(__FILE__)) . '/../models';
ActiveRecord\Config::initialize(function($cfg) use ($model_directory)
{
    
$cfg->set_model_directory($model_directory);
    
$cfg->set_connections(array(
        
//'connection_name' => 'mysql://username:password@localhost/database_name?charset=utf8',
        
'production' => 'mysql://superadmin:1qaz@WSX@127.0.0.1/gepgroupdb?charset=utf8',
//        'production' => 'mysql://gepgroupdbuser:Ggdb%76@192.168.159.72/gepgroupdb?charset=utf8',
    
));
    
    
$cfg->set_default_connection('production');
});