windows下安装php的memcache模块的方法,phpmemcache_PHP教程

WBOY
Libérer: 2016-07-13 09:57:41
original
707 Les gens l'ont consulté

windows下安装php的memcache模块的方法,phpmemcache

要求必备知识

熟悉基本编程环境搭建。

运行环境

windows 7(64位);
php-5.3;
memcached-1.2.6

下载地址

环境下载

什么是PHP Memcache模块

Memcache模块提供了于memcached方便的面向过程及面向对象的接口,memcached是为了降低动态web应用 从数据库加载数据而产生的一种常驻进程缓存产品。

下载memcache官网PHP Memcache下载地址

这里需要注意一下版本号,根据个人情况而定,我下的是php_memcache-3.0.8-5.3-ts-vc9-x86.zip

用phpinfo()函数查看当前PHP版本的信息

安装扩展

将下载下来的压缩包解压,然后将 php_memcache.dll模块拷贝到PHP的ext文件夹内。

修改php.ini文件

引入如下代码

测试

重启web服务器。

在memcache.php文件中输入如下代码:

<&#63;php
$memcache = new Memcache;
$memcache->connect('127.0.0.1',11211);
$memcache->set('key','hello memcache!');
$out = $memcache->get('key');
echo $out;
&#63;>
Copier après la connexion

在浏览器中进行测试,这里需要注意的是memcache服务必需在启动状态下哦。关于memcache服务在windows平台的安装,可以参考我之前写的一篇文章哦。

Memcache for Windows

如以上文章或链接对你有帮助的话,别忘了在文章结尾处轻轻点击一下 “还不错”按钮或到页面右下角点击 “赞一个” 按钮哦。你也可以点击页面右边“分享”悬浮按钮哦,让更多的人阅读这篇文章。

由于本人水平有限,文章在表述和代码方面如有不妥之处,欢迎批评指正。留下你的脚印,欢迎评论哦。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/980228.htmlTechArticlewindows下安装php的memcache模块的方法,phpmemcache 要求必备知识 熟悉基本编程环境搭建。 运行环境 windows 7(64位); php-5.3; memcached-1.2.6 下载地址...
Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!