开发者

Using a connection string where the password contains a "@" sign?

开发者 https://www.devze.com 2023-02-05 05:47 出处:网络
When connecting to a database server endpoint, using a connection string f开发者_如何学JAVAormat such as the following:

When connecting to a database server endpoint, using a connection string f开发者_如何学JAVAormat such as the following:

mongodb://username:password@server:port/database

Is it possible to connect if the password contains an '@' sign?

If so, how?


If you download the latest code from Github you can use:

new Mongo("mongodb://host/db", array("username" => $username, "password" => $password));
0

精彩评论

暂无评论...
验证码 换一张
取 消