开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜