Php Bootstrap3 Yii小部件包含错误

Php Bootstrap3 Yii小部件包含错误,php,yii,twitter-bootstrap-3,Php,Yii,Twitter Bootstrap 3,我已经配置了Yii bootstrap3扩展名BsHtml和bootstrap.widgets.BsPanel工作正常,但是当我使用bootstrap.widgets.BsGridView或BsNavbar时,我遇到以下错误: include(BsWidget.php): failed to open stream: No such file or directory on F:\wamp\www\yii\framework\YiiBase.php(427) 放 在类定义之前,要查找它,需

我已经配置了Yii bootstrap3扩展名
BsHtml
bootstrap.widgets.BsPanel
工作正常,但是当我使用
bootstrap.widgets.BsGridView
BsNavbar
时,我遇到以下错误:

include(BsWidget.php): failed to open stream: No such file or directory 

on F:\wamp\www\yii\framework\YiiBase.php(427)

在类定义之前,要查找它,需要时可以插入

Yii::setPathOfAlias('bootstrap.widgets.BsWidget', dirname(__FILE__).'/../extensions/bootstrap/behaviors/BsWidget');

在返回数组之前,请先在文件
protected/config/main.php
中打开main.php中的protected/config/main.php 在main.php中查找此cod

  'components'=>array(
然后在数组中添加以下代码

  'bootstrap'=>array(
        'class'=>'bootstrap.components.Bootstrap',
    ),
比如说

'components'=>array(
       'bootstrap'=>array(
        'class'=>'bootstrap.components.Bootstrap',
    ),
之后,您应该转到protexted/views/layouts/main.php 然后找到这个html

      <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
      <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
      <!--[if lt IE 8]>
      <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />

      <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
      <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
      <!--[if lt IE 8]>
      <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
    <?php
    echo yii::app()->bootstrap->register();
    ?>