Couchbase PHP Client Library

Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History


Connecting to a Live Server

The 1.0.x PHP Couchbase Client Library does not currently use multiple URIs, but this can be easily worked around when setting up the connection. A future release will add support for multiple URIs.

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
$servers = array("http://server1:8091", "http://server2:8091");

do {
  if(empty($servers)) {
    echo "no suitable server found";
    // throw
  $server = array_pop($servers);
  $cb = new Couchbase($server);
} while(!$cb);

// $cb is now usable.

(untested, but should work)

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.