开发者

CakePHP 2 can not find plugin

开发者 https://www.devze.com 2023-03-13 20:50 出处:网络
In CakePHP 2 I use @ichikaway\'s MongoDB plugin like this: public $default = array( \'datasource\' => \'mongodb.mongodbSource\',

In CakePHP 2 I use @ichikaway's MongoDB plugin like this:

public $default = array(
    'datasource' => 'mongodb.mongodbSource',
    'database' => 'mydbname',
    'host' =&g开发者_Python百科t; 'host.mongohq.com',
    'port' => 27018,
    'login' => 'username',
    'password' => 'secret'
);

I have placed it in plugins/mongodb yet Cake can not find it and thus can not connect. What am I doing wrong?


You need to load the plugin in the bootstrap.php file either individually or all of your plugins with CakePlugin::loadAll()

Also, keep in mind that your plugins need to be camelized, it should be Mongodb

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号