ThinkPHP6使用mongodb
2022-07-28 14:14:58
147
{{single.collect_count}}

呵呵,是不是报错了?

 

到目录下 vendor/topthink/think-orm/src/db/connector/Mongo.php下修改

if (empty($config['dsn'])) {$config['dsn'] = 'mongodb://' . ($config['username'] ? "{$config['username']}" : '') . ($config['password'] ? ":{$config['password']}@" : '') . $config['hostname'] .($config['hostport'] ? ":{$config['hostport']}" : ''). ($config['database'] ? "/{$config['database']}" : '');}

 

回帖
全部回帖({{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 ? '加载中...' : '查看更多评论'}}