TokyoTyrant
PHP Manual

TokyoTyrant::connect

(PECL tokyo_tyrant >= Unknown)

TokyoTyrant::connectConnect to a database

Opis

public TokyoTyrant TokyoTyrant::connect ( string $host [, int $port [, bool $persistent ]] )

Connects to a remote database

Parametry

host

The hostname

port

The port. Default: 1978

persistent

Whether to create a persistent connection. Default: TRUE

Zwracane wartości

This method returns the current object and throws TokyoTyrantException on failure.

Przykłady

Przykład #1 TokyoTyrant::connect example

<?php
$tt 
= new TokyoTyrant();
$tt->connect("localhost"TokyoTyrant::RDBDEF_PORT)->put("test""value");
?>

Zobacz też:


TokyoTyrant
PHP Manual