Php/docs/tokyotyrant.construct
来自菜鸟教程
TokyoTyrant::__construct
(PECL tokyo_tyrant >= 0.1.0)
TokyoTyrant::__construct — Construct 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
参见
- TokyoTyrant::connect() - Connect to a database
- TokyoTyrant::connectUri() - Connects to a database