mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Added an example for SSL and a certificate.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339268 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
17fc359d7e
commit
5485b48982
1 changed files with 16 additions and 0 deletions
|
@ -135,6 +135,22 @@ $manager = new MongoDB\Driver\Manager("mongodb://myusername:mypassword@localhost
|
|||
|
||||
$manager = new MongoDB\Driver\Manager("mongodb://giant:Hell%40Peop%25e@localhost:27017/mydatabase");
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Connecting to MongoDB with SSL and a certificate:
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$manager = new MongoDB\Driver\Manager(
|
||||
"mongodb://username:password@aws-us-east-1-portal.xx.dblayer.com:28071/admin?ssl=true",
|
||||
[],
|
||||
["cafile" => "/full/path/to/cert"]
|
||||
);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue