zoukankan      html  css  js  c++  java
  • memcached+php客户端

    连接memcached

    <?php

    $mem = new Memcache;

    $mem->connect('localhost',11211) or die("connected failed !!!");

    ?>

    写入数据

    <?php

    $mem->set('key1','test value',0,20);

    ?>

    读取数据

    <?php

    $key1 = $mem->get('key1');

    echo $key1;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

    ?>

  • 相关阅读:
    MyBatis通过JDBC生成的执行语句问题
    request.getParameter()、request.getInputStream()和request.getReader()
    Spring 实现数据库读写分离
    图片分布式存储
    切换城市的功能实现
    一直在前进的路上
    test blog
    SSIS 系列
    微信摇一摇优惠券
    扫描二维码实现一键登录
  • 原文地址:https://www.cnblogs.com/no314/p/3655877.html
Copyright © 2011-2022 走看看