Advertisement
Guest User

Untitled

a guest
Oct 10th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.04 KB | None | 0 0
  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.     'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  10.     'name'=>'My Web Application',
  11.  
  12.     // preloading 'log' component
  13.     'preload'=>array('log'),
  14.  
  15.     // autoloading model and component classes
  16.     'import'=>array(
  17.         'application.models.*',
  18.         'application.components.*',
  19.     ),
  20.  
  21.     'modules'=>array(
  22.         // uncomment the following to enable the Gii tool
  23.         /*
  24.         'gii'=>array(
  25.             'class'=>'system.gii.GiiModule',
  26.             'password'=>'Enter Your Password Here',
  27.             // If removed, Gii defaults to localhost only. Edit carefully to taste.
  28.             'ipFilters'=>array('127.0.0.1','::1'),
  29.         ),
  30.         */
  31.     ),
  32.  
  33.     // application components
  34.     'components'=>array(
  35.       'viewRenderer' => array(
  36.       'class' => 'ext.ETwigViewRenderer',
  37.  
  38.       // All parameters below are optional, change them to your needs
  39.       'fileExtension' => '.twig',
  40.       'options' => array(
  41.           'autoescape' => true,
  42.       ),
  43.       'extensions' => array(
  44.           'My_Twig_Extension',
  45.       ),
  46.       'globals' => array(
  47.           'html' => 'CHtml'
  48.       ),
  49.       'functions' => array(
  50.           'rot13' => 'str_rot13',
  51.       ),
  52.       'filters' => array(
  53.           'jencode' => 'CJSON::encode',
  54.       ),
  55.       // Change template syntax to Smarty-like (not recommended)
  56.       'lexerOptions' => array(
  57.           'tag_comment'  => array('{*', '*}'),
  58.           'tag_block'    => array('{', '}'),
  59.           'tag_variable' => array('{$', '}')
  60.       ),
  61.   ),  
  62.         'user'=>array(
  63.             // enable cookie-based authentication
  64.             'allowAutoLogin'=>true,
  65.         ),
  66.         // uncomment the following to enable URLs in path-format
  67.         /*
  68.         'urlManager'=>array(
  69.             'urlFormat'=>'path',
  70.             'rules'=>array(
  71.                 '<controller:\w+>/<id:\d+>'=>'<controller>/view',
  72.                 '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
  73.                 '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
  74.             ),
  75.         ),
  76.         */
  77.         'db'=>array(
  78.             'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
  79.         ),
  80.         // uncomment the following to use a MySQL database
  81.         /*
  82.         'db'=>array(
  83.             'connectionString' => 'mysql:host=localhost;dbname=testdrive',
  84.             'emulatePrepare' => true,
  85.             'username' => 'root',
  86.             'password' => '',
  87.             'charset' => 'utf8',
  88.         ),
  89.         */
  90.         'errorHandler'=>array(
  91.             // use 'site/error' action to display errors
  92.             'errorAction'=>'site/error',
  93.         ),
  94.         'log'=>array(
  95.             'class'=>'CLogRouter',
  96.             'routes'=>array(
  97.                 array(
  98.                     'class'=>'CFileLogRoute',
  99.                     'levels'=>'error, warning',
  100.                 ),
  101.                 // uncomment the following to show log messages on web pages
  102.                 /*
  103.                 array(
  104.                     'class'=>'CWebLogRoute',
  105.                 ),
  106.                 */
  107.             ),
  108.         ),
  109.     ),
  110.  
  111.     // application-level parameters that can be accessed
  112.     // using Yii::app()->params['paramName']
  113.     'params'=>array(
  114.         // this is used in contact page
  115.         'adminEmail'=>'webmaster@example.com',
  116.     ),
  117. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement