zoukankan      html  css  js  c++  java
  • windows的php7安装memcache扩展

    安装memcache:http://www.runoob.com/memcached/memcached-connection.html
    1.4.4
    c:memcachedmemcached.exe -d install
    c:memcachedmemcached.exe -d start
    c:memcachedmemcached.exe -d stop

    1.4.5

    schtasks /create /sc onstart /tn memcached /tr “‘c:memcachedmemcached.exe’ -m 512”
    telnet HOST PORT
    今天想在window下安装php7的memcache扩展,结果发现php_memcache.dll的官方编译出来的版本支持到PHP 5.6就停了,找了半天才在外国人的网站找到

    https://stackoverflow.com/questions/34952502/memcache-for-php7-on-windows,

    git下载地址:https://github.com/nono303/PHP7-memcache-dll

    百度网盘链接:http://pan.baidu.com/s/1ge9MvEN 密码:zwoh

    根据自己的php版本下载

    下载解压后,

    就到 php/ext 目录下 把 php_memcache.dll 放到里面

    然后在 php 目录下的 php.ini 增加一段内容
    extension=php_memcache.dll

    加完之后,重启 apache或者nginx

    然后 在php页面输出phpinfo();

    检查 memcache 是否成功加载了。

    如果成功加载了 ,就可以 在一个php页面做 memcache测试了

    <?php
    //phpinfo();

    $memcache = new Memcache;
    $memcache->connect('127.0.0.1',11211) or die('shit');

    $memcache->set('key','hello memcache!');

    $out = $memcache->get('key');

    echo $out;

    成功的话会输出
    ---------------------
    作者:天涯孤狼x
    来源:CSDN
    原文:https://blog.csdn.net/the_lone_wolfs/article/details/79099858
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    正则基础之——反向引用
    zend framework 配置连接数据库
    Zend Framework Module之多模块配置
    zend framework 1.10项目配置与经典hello world
    CSS3 @font-face
    js跳转页面方法(转)
    CSS中怎么让DIV居中
    HTML段落自动换行的样式设置
    PHPEXCEL实例-导出EXCEL
    移动端框架篇-控制父容器的滑屏框架-slip.js
  • 原文地址:https://www.cnblogs.com/w1618/p/10796377.html
Copyright © 2011-2022 走看看