Quiero poner los datos pero como hay muchos no se si ponerlo en el master en el default o en el test. Me da error cuando pongo los datos de mi base de datos no lo atino, hay tres configuraciones y ademas hay otros tres mas abajo. Este es el script 360 agriya contest.
estes el codigo:
Código PHP:
class DATABASE_CONFIG
{
// For localhost i.e., development -->
// *** Note: Do not edit $default and $master for server DB config
var $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => '360Contest',
'prefix' => '',
'encoding' => 'UTF8',
'port' => '',
);
var $master = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => '360Contest',
'prefix' => '',
'encoding' => 'UTF8',
'port' => '',
);
var $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => '360Contest',
'prefix' => '',
'encoding' => 'UTF8',
);
// <-- localhost
// For server i.e., production -->
// if there is no master/slave, set the values same to both
var $server_default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => '360Contest',
'prefix' => '',
'encoding' => 'UTF8',
'port' => '',
);
var $server_master = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => '360Contest',
'prefix' => '',
'encoding' => 'UTF8',
'port' => '',
);
var $server_test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => '360Contest',
'prefix' => '',
'encoding' => 'UTF8',
);
// <-- server
public function __construct()
{
// When running on production server, switch the db config ...
if (!empty($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] != '127.0.0.1') {
$this->default = $this->server_default;
$this->master = $this->server_master;
}
}
}
?>