CakePHP 2找不到插件 [英] CakePHP 2 can not find plugin

查看:118
本文介绍了CakePHP 2找不到插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在CakePHP 2中,我使用@ ichikaway 的MongoDB插件这:

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'
);

我已将它放在 plugins / mongodb 因此不能连接。
我做错了什么?

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

推荐答案

您需要单独或在bootstrap.php文件中加载插件所有的插件CakePlugin :: loadAll()

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

另外,请记住你的插件需要被camel化,它应该是Mongodb

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

这篇关于CakePHP 2找不到插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆