Yii 应用创建

'name'=>'兔子后台管理系统',
'theme'=>'theme',//使用的主题。
// preloading 'log' component
'preload'=>array('log','bootstrap'),  //自动加载的组件。
'defaultController'=>'site', //这只默认控制器。


例如我们使用bootstrap组件步骤。


1,http://www.yiiframework.com/extension/bootstrap/files/yii-bootstrap-2.0.2.r326.zip 下载bootstrap扩展
2,解压至/www/var/yii_test/protected/extensions/bootstrap 下。
3,将主题theme解压到themes下。
4,配置:main.php
return array() 上面加上
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');


    'import'=>array(
'application.models.*',
'application.components.*',
'ext.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'generatorPaths'=> array('bootstrap.gii'),
'class'=>'system.gii.GiiModule',
'password'=>'password',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),


    'components'=>array( 

'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
   ),
5,访问http://localhost/yii_test2/  --后台演示发生变化。
6,使用bootstrap
    http://www.cniska.net/yii-bootstrap/查看例子即可


你可能感兴趣的:(Yii 应用创建)