You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple use case to check you can connect to CouchDB and check what version of CouchDB it's running.
17
+
Here's the tl;dr of how to begin. For more detailed examples, see the [wiki](https://github.com/ibm-watson-data-lab/php-couchdb/wiki)and/or generate the API docs with `composer docs`
18
18
19
19
```php
20
20
<?php
21
21
22
22
require "vendor/autoload.php";
23
23
24
+
// connect to CouchDB (does make a call to check we can connect)
24
25
$server = new \PHPCouchDB\Server(["url" => "http://localhost:5984"]);
25
-
echo $server->getVersion();
26
+
27
+
// get a list of databases; each one is a \PHPCouchDB\Database object
28
+
$databases = $server->getAllDbs();
29
+
30
+
// work with the "test" database (also a \PHPCouchDB\Database object)
0 commit comments