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.
Michael_xu 2b1299b408
v11.0.3-20210517
3 years ago
..
src v11.0.3-20210517 3 years ago
.gitignore v11.0.3-20210517 3 years ago
LICENSE v11.0.3-20210517 3 years ago
README.md v11.0.3-20210517 3 years ago
composer.json v11.0.3-20210517 3 years ago

README.md

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

ThinkPHP 5.0 MongoDb驱动

首先安装官方的mongodb扩展

http://pecl.php.net/package/mongodb

然后,配置应用的数据库配置文件database.phptype参数为:

'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