©
本文档使用
php.cn手册 发布
(PECL memcache >= 0.2.0)
表示连接到一个服务器组的连接。
$key
, mixed $var
[, int $flag
[, int $expire
]] )$host
[, int $port
= 11211
[, bool $persistent
[, int $weight
[, int $timeout
[, int $retry_interval
[, bool $status
[, callback $failure_callback
[, int $timeoutms
]]]]]]]] )$host
[, int $port
[, int $timeout
]] )$key
[, int $value
= 1
] )$key
[, int $timeout
= 0
] )$key
[, int &$flags
] )$type
[, int $slabid
[, int $limit
= 100
]]] )$host
[, int $port
= 11211
] )$type
[, int $slabid
[, int $limit
= 100
]]] )$key
[, int $value
= 1
] )$host
[, int $port
[, int $timeout
]] )$key
, mixed $var
[, int $flag
[, int $expire
]] )$key
, mixed $var
[, int $flag
[, int $expire
]] )$threshold
[, float $min_savings
] )$host
[, int $port
= 11211
[, int $timeout
[, int $retry_interval
= false
[, bool $status
[, callback $failure_callback
]]]]] )[#1] chris at NOSPAM dot xeneco dot co dot uk [2013-01-09 21:40:42]
It helps to know that for this extension to work, you need a server with 'Memcached' (a service independent of PHP) installed and running as a service.
The documentation herein refers a lot to 'memcache_host'. This is not an arbitrary string, but should be a host name (eg localhost) or an IP address of a server running memcached.
If you have just installed the php memcache extension then you will not necessarily have memcached installed as well