如何使用Yii引导程序?

Sah*_*hil 2 php yii twitter-bootstrap

我一直在尝试在Yii中实现twitter bootstrap扩展但不能这样做.

我按照下面的指南安装Yii.

http://www.cniska.net/yii-bootstrap/setup.html

我按照上面指南中的说明在主配置文件中复制并粘贴了以下代码.

// Define a path alias for the Bootstrap extension as it's used internally.
// In this example we assume that you unzipped the extension under     protected/extensions.
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');

return array(
'theme'=>'bootstrap', // requires you to copy the theme under your themes directory
'modules'=>array(
    'gii'=>array(
        'generatorPaths'=>array(
            'bootstrap.gii',
        ),
    ),
),
'components'=>array(
    'bootstrap'=>array(
        'class'=>'bootstrap.components.Bootstrap',
    ),
),
);
Run Code Online (Sandbox Code Playgroud)

谁能请帮忙.

Sah*_*hil 11

找到你需要把你的保护/视图您main.php文件下列答案/布局之间的任何文件夹<head></head>标签.

    <?php Yii::app()->bootstrap->registerAllCss(); ?>
Run Code Online (Sandbox Code Playgroud)