Home > Backend Development > PHP Tutorial > php中memcache的使用 及 windows 中的memcache监控工具

php中memcache的使用 及 windows 中的memcache监控工具

WBOY
Release: 2016-06-23 13:37:11
Original
951 people have browsed it

php中使用memcache

1. 测试代码

这是memcache官方测试memcache代码

<?php $memcache = memcache_connect('localhost', 11211);if ($memcache) {	$memcache->set("str_key", "String to store in memcached");	$memcache->set("num_key", 123);	$object = new StdClass;	$object->attribute = 'test';	$memcache->set("obj_key", $object);	$array = Array('assoc'=>123, 345, 567);	$memcache->set("arr_key", $array);	var_dump($memcache->get('str_key'));	var_dump($memcache->get('num_key'));	var_dump($memcache->get('obj_key'));	var_dump($memcache->get('lfxopenid'));}else {	echo "Connection to memcached failed";}?>
Copy after login


2. windows下检测 memcache


下载地址:http://download.csdn.net/detail/wujiangwei567/8571637



工具介绍详细地址:





source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template