====== データベースの接続設定と O/R マッパーの有効化 ======
- development の接続設定を行う。\\ fuelapp/fuel/app/config/development/db.php
array(
'connection' => array(
//'dsn' => 'mysql:host=localhost;dbname=fuel_db',
'hostname' => 'localhost',
'database' => 'fuel_db',
'username' => 'fuel_app',
'password' => 'password',
),
),
);
- production の接続設定を行う。\\ fuelapp/fuel/app/config/production/db.php
array(
'connection' => array(
//'dsn' => 'mysql:host=localhost;dbname=fuel_db',
'hostname' => 'localhost',
'database' => 'fuel_db',
'username' => 'fuel_app',
'password' => 'password',
),
),
);
- ベースのデータベース設定を行う。
'default',
/**
* Base config, just need to set the DSN, username and password in env. config.
*/
'default' => array(
//'type' => 'pdo',
'type' => 'mysqli',
'connection' => array(
'persistent' => false,
),
'identifier' => '`',
'table_prefix' => '',
'charset' => 'utf8',
'enable_cache' => true,
'profiling' => false,
),
'redis' => array(
'default' => array(
'hostname' => '127.0.0.1',
'port' => 6379,
'timeout' => null,
)
),
);
- O/R マッパーを有効化する。\\ fuel/app/config/config.php
'packages' => array(
'orm', // Ormを有効化
),