Home  >  Article  >  Backend Development  >  PHP联接Memcache代码

PHP联接Memcache代码

WBOY
WBOYOriginal
2016-06-13 12:22:15638browse

PHP连接Memcache代码

<?php$mem = new Memcache;$mem->connect('127.0.0.1', 11211) or die ("Could not connect");$mem->set('key', 'This is a test!', 0, 60);$val = $mem->get('key');echo $val;?>

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn