Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: PHP  |  size: 2.60 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. // uncomment the following to define a path alias
  4. // Yii::setPathOfAlias('local','path/to/local-folder');
  5.  
  6. // This is the main Web application configuration. Any writable
  7. // CWebApplication properties can be configured here.
  8. return array(
  9.  
  10.         'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  11.         'name'=>'xxxxxx',
  12.  
  13.         // preloading 'log' component
  14.         'preload'=>array('log'),
  15.  
  16.         // autoloading model and component classes
  17.         'import'=>array(
  18.                 'application.models.*',
  19.                 'application.components.*',
  20.                 'application.modules.user.models.*',
  21.                 'application.modules.user.components.*',
  22.         ),
  23.  
  24.  
  25.         'modules'=>array(
  26.                 // uncomment the following to enable the Gii tool
  27.                 'user',
  28.                 'gii'=>array(
  29.                         'class'=>'system.gii.GiiModule',
  30.                         'password'=>'xxxxxx',
  31.                         // If removed, Gii defaults to localhost only. Edit carefully to taste.
  32.                         //'ipFilters'=>array('127.0.0.1','xxx.xxx.xxx.x'),
  33.                         'ipFilters'=>false,
  34.                 ),
  35.                
  36.         ),
  37.  
  38.         // application components
  39.         'components'=>array(
  40.                 'user'=>array(
  41.                         // enable cookie-based authentication
  42.                         'allowAutoLogin'=>true,
  43.                         'loginUrl' => array('/user/login'),
  44.                 ),
  45.                 // uncomment the following to enable URLs in path-format
  46.                
  47.                 'urlManager'=>array(
  48.                         'urlFormat'=>'path',
  49.                         'showScriptName'=>false,
  50.                         'rules'=>array(
  51.                                 '<controller:\w+>/<id:\d+>'=>'<controller>/view',
  52.                                 '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
  53.                                 '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
  54.                         ),
  55.                 ),
  56.                
  57.                
  58.                 'db'=>array(
  59.                         /*'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',*/
  60.                 ),
  61.                 // uncomment the following to use a MySQL database
  62.                
  63.                 'db'=>array(
  64.                         'connectionString' => 'xxxx',
  65.                         'emulatePrepare' => true,
  66.                         'username' => 'xxxx',
  67.                         'password' => 'xxxxx',
  68.                         'charset' => 'utf8',
  69.                         'tablePrefix' => 'tbl_',
  70.                         'enableProfiling'=> true,
  71.             'enableParamLogging' => true,
  72.                 ),
  73.                
  74.                 'errorHandler'=>array(
  75.                         // use 'site/error' action to display errors
  76.             'errorAction'=>'site/error',
  77.         ),
  78.                 'log'=>array(
  79.                         'class'=>'CLogRouter',
  80.                         'routes'=>array(
  81.                                 array(
  82.                                         'class'=>'CFileLogRoute',
  83.                                         'levels'=>'error, warning',
  84.                                 ),
  85.                                 // uncomment the following to show log messages on web pages
  86.                                 /*
  87.                                 array(
  88.                                         'class'=>'CWebLogRoute',
  89.                                         'levels'=>'trace,info, error, warning',
  90.                                         'categories'=>'system.db.*',
  91.                                 ),
  92.                                 */
  93.                         ),
  94.                 ),
  95.         ),
  96.  
  97.         // application-level parameters that can be accessed
  98.         // using Yii::app()->params['paramName']
  99.         'params'=>array(
  100.                 // this is used in contact page
  101.                 'adminEmail'=>'webmaster@codingdojo.com',
  102.         ),
  103. );