mp=InitPHP::getLibrarys("mp"); $keyword = $this->mp->getKeyword(); if ($keyword == "签到") { $this->mc=InitPHP::getDao("mc"); $session=$this->mc->get($this->mp->mpobj->FromUserName); $session['time']=$session['time']?$session['time']:0; $session['time']++; $this->mc->set($this->mp->mpobj->FromUserName, $session, 0); $response =$this->mp->mpobj->FromUserName.":第". $session['time']."次签到成功!"; $this->mp->responseText($response); }else { $response = "签到失败!"; $this->mp->responseText($response); } } }