CakePHP 2 can not find plugin

柔情痞子 提交于 2019-12-10 18:50:04

问题


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

public $default = array(
    'datasource' => 'mongodb.mongodbSource',
    'database' => 'mydbname',
    'host' => '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?


回答1:


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



来源:https://stackoverflow.com/questions/6405665/cakephp-2-can-not-find-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!