分为2步骤

       1.下载predis

       2.使用predis,让php与redis进行通信

  <?php

      require('autoload.php');
      $redis = new Predis\Client(array(
                              'scheme' => 'tcp',
                              'host' => '192.168.0.104',
                              'port' => 6379,
           ));