Ejemplo n.º 1
0
 function doLogin()
 {
     // $db = PiDb::init('hihus');
     // $sql = 'select * from users where 1=1';
     // $res = $db->query($sql);
     // while($l = $res->fetch(PDO::FETCH_ASSOC)){
     // 	print_r($l);
     // }
     $mem = PIMem::get('users');
     $mem->set("hihu", "100", 10 * 60);
     $s = $mem->get("hihu");
     var_dump($s);
 }
Ejemplo n.º 2
0
 public function getInstance($driver, $conf_name)
 {
     $instance = null;
     if ($driver == 'memcache') {
         $instance = PIMem::get($conf_name);
     } else {
         if ($driver == 'mongo') {
             $instance = null;
         } else {
             throw new Exception('queue.err can not getInstance:' . $driver, 8088);
         }
     }
     return $instance;
 }