Specific operations for installing memcached in wamp environment

WBOY
Release: 2016-08-08 09:21:31
Original
1154 people have browsed it

1. Download the memcache installation package, and choose the installation package for the win environment.

2. Unzip it and put it on the D drive (take D:/memcached as an example)

3. Click Start => Run => Enter cmd to enter DOS interface.

4, input

D: command enter the D drive, enter the

CD Memcached

command to enter the Memcached folder

5, enter Memcache.exe —D Install
command installation, enter

Memcache .exe –d start

Start the memcached process. stop command memcached.exe -d stop, uninstall command memcached.exe -d unistall6. Enter the task manager and check the process. As shown below, the installation is successful:

7. Download

php_memcache.dll Extension file, put it in the binphpphp5.5.12ext directory in the wamp installation directory

8. Open php.ini and add extension=php_memcache.dll , note that there is no semicolon in front, save and restart the service

9. Create a new local project memcached, add the index.php execution file, enter the code as follows:

<?php
    // 初始化memcache对象
    $memcache = new Memcache();
    $memcache->connect("127.0.0.1", 11211);
    // 赋值
    $memcache->add('name', 'feige', false, 60);
    // 获取值
    $val = $memcache->get('name');
    echo $val;
?>
Copy after login
will be output if successful feige

Copyright statement: This article is the original article of the blogger and may not be reproduced without the permission of the blogger.

The above introduces the specific operations of installing memcached in the wamp environment, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!