Пример #1
0
 public function _unlikeImg($id)
 {
     $mem = new Memcache();
     $mem->connect("127.0.0.1", 11211);
     $like = $mem->get("f_" . $_SESSION['USERID']);
     $like[$id] = NULL;
     $mem->set("f_" . $_SESSION['USERID'], $like, 0, 0);
     $recommender = recommender::getInstance();
     $recommender->set_rating($_SESSION['USERID'], $id, 0);
     echo json_encode("true");
     $this->model->Del_By_ImageId($id);
     $img = new image();
     $img->removefromfavor($id);
 }
Пример #2
0
 public function _test()
 {
     $recommender = recommender::getInstance();
     $recommender->auto_test();
 }