php教程

TokyoTyrant::__construct

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::__constructConstruct a new TokyoTyrant object

说明

public TokyoTyrant::__construct ([ string $host [, int $port = TokyoTyrant::RDBDEF_PORT [, array $options ]]] )

Constructs a new TokyoTyrant object and optionally connects to the database

参数

host

The hostname. Default: NULL

port

port number. Default: 1978

options

Connection options: timeout (default: 5.0), reconnect (default: TRUE) and persistent (default: TRUE)

返回值

Throws TokyoTyrantException if connection to database fails

参见

User Contributed Notes

bit dot kevin at gmail dot com 25-Sep-2010 02:55
Catch The Exception
<?php
       
try {
           
$tt = new TokyoTyrant("192.168.1.100", 11211);
        }catch (
TokyoTyrantException $e) {
           
var_dump($e);
            exit;
        }
?>

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788