Php Yiistrap配置问题
我正在尝试让Yiistrap(Yii框架的引导)在CentOS6.5上工作。我已将yiistrap主机解包到extensions/bootstrap中,并将以下内容添加到protected/config/main.php中: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
// 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.*'
)