【发布时间】:2009-09-20 02:07:58
【问题描述】:
我已经为我的 PHP Apache 本地服务器服务器 (XAMPP) 启用了 memcache 扩展
但我不知道如何使用它来加速我的 PHP 脚本 在我要加速的每个页面的顶部写以下代码就足够了吗?还是我应该做点别的?
/* procedural API */
$memcache_obj = memcache_connect('127.0.0.1', 11211);
/* OO API */
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211);
phpinfo() 显示以下详细信息
memcache support enabled
Active persistent connections 0
Version 2.2.4-dev
Revision $Revision: 1.99 $
谢谢
【问题讨论】:
标签: php optimization