<?phpnamespace app\common\model; class Cache { public $redis = null; public function __construct() { if (is_null($this->redis)) { $this->redis = new \Redis(); $this->redis->connect('127.0.0.1', '6379'); } } //获取对应缓存 //subkey = 's' public fu
pconnect函数声明 其中time_out表示客户端闲置多少秒后,就断开连接.函数连接成功返回true,失败返回false: pconnect(host, port, time_out, persistent_id, retry_interval) host: string. can be a host, or the path to a unix domain socket port: int, optional timeout: float, value in seconds (opti