我已经添加了引导扩展到我的yii和安装在安装指南中描述。扩展文件夹中的所有文件夹都是rwrwrw,但是我得到了上面写的错误。可能是什么原因?我已经从yii::Import抛出了路径,该路径是正确的。
谢谢!
用代码编辑
这是我的配置:
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
//Yii::setPathOfAlias('bootstrap', '/Users/gerritlober/Sites/yii/webapp/protected/extensions/bootstrap');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Carpool',
'theme' => 'bootstrap',
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'xxx',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths'=>array(
'bootstrap.gii',
),
),
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
/*
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),*/
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=carpool_dev',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'enableProfiling' => true,
),
'authManager'=>array(
'class'=>'CDbAuthManager',
'connectionID'=>'db',
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
array(
'class'=>'CWebLogRoute',
'categories' => 'system.db.*,GLWeb.*,application.*'
),
),
),
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'webmaster@example.com',
),);
我的引导扩展在./受保护/扩展/引导中。
发布于 2013-06-11 08:11:50
我也有同样的问题。我授予该文件夹完全(777)权限。
试试看。
发布于 2013-05-18 16:35:15
通过:ext.bootstrap.src.components.Bootstrap'更新组件,
如果您是在扩展下解压的,请按照上面的命令操作:
语法:ext.path_to.Bootstrap
发布于 2013-01-15 22:36:07
你有两个选择。其中之一,在config/main.php文件或等效文件中,添加以下行:
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/yii-bootstrap');在这里,您需要用实际调用的引导文件夹替换yii-bootstrap。
或者第二,您可以首先正确地引用该引导文件夹。如果您的引导安装与我的安装一样安装在/extensions/yii中,那么使用这个别名加载组件:
ext.yii-bootstrap.components.Bootstrap简而言之,您的问题可能是您没有正确地定义安装路径。使用上述两种解决方案之一,从而解决该问题。
https://stackoverflow.com/questions/14347149
复制相似问题