cmd开启缓存

    • 下载memcache安装包和php扩展文件php_memcache.dll。解压memcache,把memcached移动到C盘。

      windows下网站怎么开启memcache

      windows下网站怎么开启memcache

      windows下网站怎么开启memcache

    • 单击开始菜单,运行“cmd”。

      cd ..     //进入c盘

      cd memcached   //进入memcache目录

      memcache.exe -d install   //安装memcache服务

      windows下网站怎么开启memcache

      windows下网站怎么开启memcache

    • 设置php:找到php安装目录,打开php.ini文件。找到配置文件里允许支持扩展的区域exetension=。。,添加一行exetension=php_memcache.dll。

      windows下网站怎么开启memcache

    • 把php扩展文件php_memcache.dll移动到php安装目录下的ext目录下。注意在php.ini中要设置好exetension目录。php_memcache.dll此文件需要先在网上下载下来!

      windows下网站怎么开启memcache

    • 设置apache:

      打开apache配置文件httpd.conf,找到LoadModule加载模块区域。去掉前面的“LoadModule mem_cache_module modules/mod_mem_cache.so”#号

      windows下网站怎么开启memcache

    • 重启apache服务。linux下重启使用命令:service httpd restart。

      然后就大功告成!

      windows下网站怎么开启memcache

    • 新建一个php测试文件info.php。

      <?php

       phpinfo();

      ?>

      放在网站根目录下(phpinfo()是个函数,功能就是输出一些php信息)

      windows下网站怎么开启memcache

    • 测试。在浏览器里输入网站域名或者ip/info.php。

      往下拉看看memcache字样就说明成功了。或者在页面上ctrl+F快速搜索memcache。

      windows下网站怎么开启memcache

猜你喜欢

转载自blog.csdn.net/weixin_36810906/article/details/82587458