Windows installs the Redis extensions and tests for PHP (PHP versions)

Source: Internet
Author: User
Tags download redis php development environment

Pre-conditions:
1. PHP development environment has been built
2. Redis is installed

Windows install the Redis extension for PHP
1. by Phpinfo (); function to view PHP information

2. Download Redis extension file: Https://pecl.php.net/package/redis

3. Place the downloaded "Php_redis.dll" file in the Ext directory of PHP and modify the php.ini to add code Extension=php_redis.dll

4. Restart the Web service

Testing for Windows installation of the Redis extension for PHP

1. PHP Testing

<?php
$redis = new Redis ();
$redis->connect (' 127.0.0.1 ', 6379);
$redis->set (' Test ', ' Hello World ');
echo $redis->get (' Test ');
?>

If you can output: Hello world means that the Redis extension for PHP has been installed successfully.

Windows installs the Redis extensions and tests for PHP (PHP versions)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.