You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
旭晓耿
a20e5ab784
|
4 years ago | |
---|---|---|
.. | ||
src | 4 years ago | |
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
composer.json | 4 years ago |
README.md
ThinkPHP 5.0 MongoDb驱动
首先安装官方的mongodb扩展:
http://pecl.php.net/package/mongodb
然后,配置应用的数据库配置文件database.php
的type
参数为:
'type' => '\think\mongo\Connection',
即可正常使用MongoDb,例如:
Db::name('demo')
->find();
Db::name('demo')
->field('id,name')
->limit(10)
->order('id','desc')
->select();
1.*版本支持ThinkPHP 5.0 2.*版本支持ThinkPHP 5.1