标签:style blog http color io os 使用 ar 文件
折腾了1个多小时,终于搞定。操作系统时64位的,php5.3.13
类似于上一篇的xdebug安装教程~~
$memcache = new Memcache; $memcache->connect("localhost",11211); # You might need to set "localhost" to "127.0.0.1" echo "Server‘s version: " . $memcache->getVersion() . "\n"; $tmp_object = new stdClass; $tmp_object->str_attr = "test"; $tmp_object->int_attr = 123; $memcache->set("key",$tmp_object,false,10); echo "Store data in the cache (data will expire in 10 seconds)\n"; echo "Data from the cache:\n"; var_dump($memcache->get("key"));
---------- PhpUnit ---------- Server‘s version: 1.4.4-14-g9c660c0 Store data in the cache (data will expire in 10 seconds) Data from the cache: object(stdClass)#3 (2) { ["str_attr"]=> string(4) "test" ["int_attr"]=> int(123) } Output completed (2 sec consumed) - Normal Termination
win7下64位系统memcache/memcached安装教程
标签:style blog http color io os 使用 ar 文件
原文地址:http://www.cnblogs.com/chen-lhx/p/3968811.html