中文帮助

php-redis函数帮助手册_consturct_connect_open_pconnect...

僤鯓⒐⒋嵵緔 提交于 2019-12-03 21:36:13
Redis::__construct Description Creates a Redis client 创建一个Redis客户端 Example $redis = new Redis(); connect, open Description Connects to a Redis instance.( 连接到一个Redis实例) Parameters host : string. can be a host, or the path to a unix domain socket host:字符串类型 可以使一个HOST IP或者是一个UNIX DOMAIN SOCKET的路径 port : int, optional port:整数型,Redis的运行端口 timeout : float, value in seconds (optional, default is 0 meaning unlimited) timeout:浮点型,连接的市场,单位是秒,默认为0即连接没有时间限制 Return Value BOOL : TRUE on success, FALSE on error. Example $redis->connect('127.0.0.1', 6379); $redis->connect('127.0.0.1'); // port 6379 by default