分享一篇thinkphp6 多应用模式链接 mongoDB的开发笔记
2022-11-24 11:10:29
222
{{single.collect_count}}

thinkphp6 多应用模式链接 mongoDB 开发笔记

这篇文章简单示例 mongodb 的连接使用,并解决了以下三个问题:

  1. No suitable servers found (serverSelectionTryOnce set):
  2. Class ‘MongoDB\Driver\Query’ not found
  3. 密码中包含!或者@字符引起的报错。
  4. Authentication failed.

其中,Authentication failed. 需要修改 tp6 的框架代码。

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}