文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== データベースの接続設定と O/R マッパーの有効化 ====== - development の接続設定を行う。\\ fuelapp/fuel/app/config/development/db.php <code php> <?php /** * The development database settings. */ return array( 'default' => array( 'connection' => array( //'dsn' => 'mysql:host=localhost;dbname=fuel_db', 'hostname' => 'localhost', 'database' => 'fuel_db', 'username' => 'fuel_app', 'password' => 'password', ), ), ); </code> - production の接続設定を行う。\\ fuelapp/fuel/app/config/production/db.php <code php> <?php /** * The production database settings. */ return array( 'default' => array( 'connection' => array( //'dsn' => 'mysql:host=localhost;dbname=fuel_db', 'hostname' => 'localhost', 'database' => 'fuel_db', 'username' => 'fuel_app', 'password' => 'password', ), ), ); </code> - ベースのデータベース設定を行う。<code php> <?php /** * Base Database Config. * * See the individual environment DB configs for specific config information. */ return array( 'active' => '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, ) ), ); </code> - O/R マッパーを有効化する。\\ fuel/app/config/config.php <code php> 'packages' => array( 'orm', // Ormを有効化 ), </code> php/fuelphp/database_setting.txt 最終更新: 2019/08/19 07:04by ともやん