pictcode / app / Config / database.php.default @ ceb21f43
履歴 | 表示 | アノテート | ダウンロード (3.125 KB)
| 1 | 
      <?php  | 
  
|---|---|
| 2 | 
      /**  | 
  
| 3 | 
      * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)  | 
  
| 4 | 
      * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)  | 
  
| 5 | 
      *  | 
  
| 6 | 
      * Licensed under The MIT License  | 
  
| 7 | 
      * For full copyright and license information, please see the LICENSE.txt  | 
  
| 8 | 
      * Redistributions of files must retain the above copyright notice.  | 
  
| 9 | 
      *  | 
  
| 10 | 
      * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)  | 
  
| 11 | 
      * @link http://cakephp.org CakePHP(tm) Project  | 
  
| 12 | 
      * @package app.Config  | 
  
| 13 | 
      * @since CakePHP(tm) v 0.2.9  | 
  
| 14 | 
      * @license http://www.opensource.org/licenses/mit-license.php MIT License  | 
  
| 15 | 
      */  | 
  
| 16 | 
       | 
  
| 17 | 
      /**  | 
  
| 18 | 
      * Database configuration class.  | 
  
| 19 | 
      *  | 
  
| 20 | 
      * You can specify multiple configurations for production, development and testing.  | 
  
| 21 | 
      *  | 
  
| 22 | 
      * datasource => The name of a supported datasource; valid options are as follows:  | 
  
| 23 | 
      * Database/Mysql - MySQL 4 & 5,  | 
  
| 24 | 
      * Database/Sqlite - SQLite (PHP5 only),  | 
  
| 25 | 
      * Database/Postgres - PostgreSQL 7 and higher,  | 
  
| 26 | 
      * Database/Sqlserver - Microsoft SQL Server 2005 and higher  | 
  
| 27 | 
      *  | 
  
| 28 | 
      * You can add custom database datasources (or override existing datasources) by adding the  | 
  
| 29 | 
      * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',  | 
  
| 30 | 
      *  | 
  
| 31 | 
      *  | 
  
| 32 | 
      * persistent => true / false  | 
  
| 33 | 
      * Determines whether or not the database should use a persistent connection  | 
  
| 34 | 
      *  | 
  
| 35 | 
      * host =>  | 
  
| 36 | 
      * the host you connect to the database. To add a socket or port number, use 'port' => #  | 
  
| 37 | 
      *  | 
  
| 38 | 
      * prefix =>  | 
  
| 39 | 
      * Uses the given prefix for all the tables in this database. This setting can be overridden  | 
  
| 40 | 
      * on a per-table basis with the Model::$tablePrefix property.  | 
  
| 41 | 
      *  | 
  
| 42 | 
      * schema =>  | 
  
| 43 | 
      * For Postgres/Sqlserver specifies which schema you would like to use the tables in.  | 
  
| 44 | 
      * Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use  | 
  
| 45 | 
      * the connected user's default schema (typically 'dbo').  | 
  
| 46 | 
      *  | 
  
| 47 | 
      * encoding =>  | 
  
| 48 | 
      * For MySQL, Postgres specifies the character encoding to use when connecting to the  | 
  
| 49 | 
      * database. Uses database default not specified.  | 
  
| 50 | 
      *  | 
  
| 51 | 
      * sslmode =>  | 
  
| 52 | 
      * For Postgres specifies whether to 'disable', 'allow', 'prefer', or 'require' SSL for the  | 
  
| 53 | 
      * connection. The default value is 'allow'.  | 
  
| 54 | 
      *  | 
  
| 55 | 
      * unix_socket =>  | 
  
| 56 | 
      * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`  | 
  
| 57 | 
      *  | 
  
| 58 | 
      * settings =>  | 
  
| 59 | 
      * Array of key/value pairs, on connection it executes SET statements for each pair  | 
  
| 60 | 
      * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html  | 
  
| 61 | 
      * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html  | 
  
| 62 | 
      * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx  | 
  
| 63 | 
      *  | 
  
| 64 | 
      * flags =>  | 
  
| 65 | 
      * A key/value array of driver specific connection options.  | 
  
| 66 | 
      */  | 
  
| 67 | 
      class DATABASE_CONFIG {
     | 
  
| 68 | 
       | 
  
| 69 | 
      public $default = array(  | 
  
| 70 | 
      'datasource' => 'Database/Mysql',  | 
  
| 71 | 
      'persistent' => false,  | 
  
| 72 | 
      'host' => 'localhost',  | 
  
| 73 | 
      'login' => 'user',  | 
  
| 74 | 
      'password' => 'password',  | 
  
| 75 | 
      'database' => 'database_name',  | 
  
| 76 | 
      'prefix' => '',  | 
  
| 77 | 
      //'encoding' => 'utf8',  | 
  
| 78 | 
      );  | 
  
| 79 | 
       | 
  
| 80 | 
      public $test = array(  | 
  
| 81 | 
      'datasource' => 'Database/Mysql',  | 
  
| 82 | 
      'persistent' => false,  | 
  
| 83 | 
      'host' => 'localhost',  | 
  
| 84 | 
      'login' => 'user',  | 
  
| 85 | 
      'password' => 'password',  | 
  
| 86 | 
      'database' => 'test_database_name',  | 
  
| 87 | 
      'prefix' => '',  | 
  
| 88 | 
      //'encoding' => 'utf8',  | 
  
| 89 | 
      );  | 
  
| 90 | 
      }  |