yii 用户管理 配置文件
2016-03-06 20:55
555 查看
<pre name="code" class="php"><?php return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=dby2', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'tablePrefix'=>'tb_', ];
<?php$params = require(__DIR__ . '/params.php');$config = [ 'id' => 'basic', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => 'fUb-g6QPavwsok09_bun_LNDkTMUAYy0', ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'mailer'
=> [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. 'useFileTransport' => true, ], 'log' => [ 'traceLevel' => YII_DEBUG
? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => require(__DIR__ . '/db.php'), ], 'params' => $params, 'modules' => [ 'admin' => [ 'class' => 'app\modules\admin\Module', ], ], //指定默认控制器 'defaultRoute'=>"admin/index/main",
];if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', ]; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module',
];}return $config;
相关文章推荐
- yii 用户管理 视图
- yii 用户管理 model
- yii 用户管理 controller
- php关闭浏览器,程序继续执行
- yii框架-依赖注入
- php中使用exec,system等函数调用系统命令
- easy php安装完成后启动出现丢失MSVCR110.dll错误
- Matplotlib Tutorial(译)
- yii框架-控制器/数据模型
- php checkbox复选框值的获取与checkbox默认值输出方法
- PHP预编译处理技术简介
- 对H264进行RTP封包原理
- RTP时间戳
- PHP一键比对更新MYSQL数据库的一些想法
- php正则表达式 获取开始字符串和结束字符串中的部分内容
- PHP+MYSQL+AJAX - 第四章 认识PHP基本语法
- PHP “Warning: session_start()...” 的解决方法
- 从底层剖析 php-fpm 和 mysql 之间的关系 ,涉及连接池pool
- PHP 的ini配置文件的读写操作函数
- PHP 通过fsockopen函数获取远程网页源码