Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Yiistrap配置问题_Php_Twitter Bootstrap_Yii_Yii Extensions - Fatal编程技术网

Php Yiistrap配置问题

Php Yiistrap配置问题,php,twitter-bootstrap,yii,yii-extensions,Php,Twitter Bootstrap,Yii,Yii Extensions,我正在尝试让Yiistrap(Yii框架的引导)在CentOS6.5上工作。我已将yiistrap主机解包到extensions/bootstrap中,并将以下内容添加到protected/config/main.php中: // uncomment the following to define a path alias // Yii::setPathOfAlias('local','path/to/local-folder'); // CWebApplication properties c

我正在尝试让Yiistrap(Yii框架的引导)在CentOS6.5上工作。我已将yiistrap主机解包到extensions/bootstrap中,并将以下内容添加到protected/config/main.php中:

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// CWebApplication properties can be configured here.
return array(
    'aliases'=>array(
    'bootstrap'=>'/var/www/html/happytails/protected/extensions/bootstrap'
    ),

 'import'=>array (
    'bootstrap.helpers.TbHtml',

  'components'=>array(
            'bootstrap'=>array(
            'class'=>'bootstrap.components.TbApi'
            ),
'import'=>array(
    ...
    'bootstrap.helpers.*',
    'bootstrap.widgets.*',
    'bootstrap.behaviors.*',
),
我还将register函数添加到protected/views/layouts/main.php中

<?php /* @var $this Controller */ ?>
<?php Yii::app()->bootstrap->register(); ?>

非常感谢您在这个问题上提供的任何帮助。

我也有同样的问题。您可以通过在main.php中配置引导所需的所有目录来修复此问题:

'import'=>array(
    ...
    'bootstrap.helpers.*',
    'bootstrap.widgets.*',
    'bootstrap.behaviors.*',
),

使用Yiistrap 1.3.0,我必须执行以下操作:

'import' => array(
    'bootstrap.helpers.TbHtml',
    'bootstrap.helpers.TbArray',
    'bootstrap.behaviors.TbWidget',
    'bootstrap.widgets.*'
)