<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_16782"> <div class="blockcode"> <div id="code_mLD"><ol> <li> <li>$config = Zend_Registry::get('config');</li> <li>$host = $config->setting->redis->host;</li> <li>$port = $config->setting->redis->port;</li> <li>$redis = new Redis();</li> <li>$redis->connect($host, $port) or die("connect to redis errorn");</li> <li>$redis->auth($config->setting->redis->password) or die("auth failedn");</li> <li>$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);</li> </ol></div> <em onclick="copycode($('code_mLD'));">复制代码</em> </div> </td></tr></table> <div id="comment_16782" class="cm"> </div> <div id="post_rate_div_16782"></div> <br><br>