ThinkPHP6操作MongoDB

config/databases.php  添加配置项

connections      => [

         mongo  => [

            // 数据库类型

             type               =>  mongo ,

            // 服务器地址

             hostname           =>  127.0.0.1 ,

            // 数据库名

             database           =>  test ,

            // 用户名

             username           =>  ,

            // 密码

             password           =>  ,

            // 端口

             hostport           =>  27017 ,

        ],

        // 更多的数据库配置信息

    ],

ThinkPHP6操作MongoDB使用示例参考

http://www.feishuai.vip/view/121.html

© 版权声明
THE END
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容