Home >Backend Development >PHP Tutorial >Installation of redis failed
php download dll file
http://download.csdn.net/download/bluesky321/5355093
php_redis.dll extension For PHP5.4.x
First put php_redis.dll and php_igbinary.dll into the PHP ext folder, and then add the following code to the php.ini configuration file:
extension=php_igbinary.dll
extension=php_redis.dll
Restart the web server
The code is as follows
<code>$redis = new Redis(); $redis->connect('127.0.0.1',6379); $redis->set('test','hello redis'); echo $redis->get('test'); </p> <p>?><br>Prompt Fatal error: Class 'Redis' not found in D:xampphtdocsindex.php on line 2</p> <h2>Reply content: </h2> <p>php download dll file</p> <p>http://download.csdn.net/download/bluesky321/5355093</p> <p>php_redis.dll extension For PHP5.4.x</p> <p>First put php_redis.dll and php_igbinary.dll into the PHP ext folder, and then add the following code to the php.ini configuration file: </p> <p>extension=php_igbinary.dll</p> <p>extension=php_redis.dll</p> <p>Restart the web server</p> <p>The code is as follows</p> <p><?php</p> <pre class="brush:php;toolbar:false"><code>$redis = new Redis(); $redis->connect('127.0.0.1',6379); $redis->set('test','hello redis'); echo $redis->get('test'); </p> <p>?><br>Prompt Fatal error: Class 'Redis' not found in D:xampphtdocsindex.php on line 2</p> <p class="answer fmt" data-id="1020000005750173"> </p> <p>There are three ways to check whether your PHP extension is turned on: <br>1.<code>phpinfo();</code><br>2. Command line cd to the php execution file directory, enter: <code>php -m</code><br>3. Use the following Code: </p> <pre class="brush:php;toolbar:false"><code><?php if (extension_loaded('redis')) { echo 'YES'; } else { echo 'NO'; } ?></code>