跳到主要内容

connect

连接redis服务器

声明

bool connect(mixed timeout_seconds = -1)

参数

参数名描述
timeout_seconds连接超时时间(单位:秒, <=0表示不关心超时直到连接失败)

返回值

true - 连接成功, false - 连接失败

使用方式

返回文档