PHP 手冊
上一頁 |  | 下一頁

# Memcache::get

(no version information, might be only in CVS)

Memcache::get -- Retrieve item from the server

## Description

mixed Memcache::get ( string key)

Memcache::get() returns previously stored data if an item with such key exists on the server at this moment.

示範 1.Memcache::get() example
`<?php /* procedural API */ $memcache_obj = memcache_connect('memcache_host', 11211); $var = memcache_get($memcache_obj, 'some_key'); /* OO API */ $memcache_obj = new Memcache; $memcache_obj->connect('memcache_host', 11211); $var = $memcache_obj->get('some_key'); ?>`

Memcache::get() returns `FALSE` on failure.

上一頁 | 最開頭 | 下一頁
Memcache::flush | 上一層 | Memcache::getStats