main.php
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
return [
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'fileCache' => [
'class' => 'yii\caching\FileCache',
'keyPrefix' => 'YOHOLive',
],
'cache' => [
'class' => 'common\components\pagecache\Redis',
'redis' => 'redis',
'keyPrefix' => 'YOHOLive',
],
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => '123.56.138.21',
'password' => 'yohoglobal',
'port' => 6379,
'database' => 5,
],
'redisIm' => [
'class' => 'yii\redis\Connection',
'hostname' => '123.56.138.21',
'password' => 'yohoglobal',
'port' => 6379,
'database' => 0,
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'schemaCache' => 'cache',
'queryCache' => 'cache',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
//'<controller:\w+>/<action:\w+>/<id:[\d-]+>' => '<controller>/<action>',
],
],
],
'defaultRoute'=>'index/index',
];