Home > Backend Development > PHP Tutorial > Installation of redis and use of redis in php

Installation of redis and use of redis in php

WBOY
Release: 2016-07-28 08:26:26
Original
1330 people have browsed it

yum install phpredis -y

If you use Centos’s own php, make sure php-devel is installed. Otherwise, execute:

yum install php-devel -y (the redis extension cannot be loaded without installation)

Connect to the Redis server

/ /Connecting to Redis server on localhost
redis=new Red is();redis->connect('127.0.0.1', 6379);
re sult=redis->auth(password);//Password login
red is?>select("5 ); //choosechoose libraryech o"Connectiont oser versucessfull y; //checkwhe ther serverisrunni ngo rnotecho"Serve ris running:. redis->ping();

') .addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the installation of redis and the use of redis in PHP, 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