大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

phpcookie控制提交频率-创新互联

         //我要提问基于tp3.2             public function tiwen(){                 $cityId = parent::$cityId;//区分城市id                 $typeDb=D("FangType");                 $typeData=$typeDb->getConfig(36,$cityId);                 $this->assign("typeData",$typeData);                 if($_POST){                 $db = D("EsfAsk");                 $userid=  $this->userId;                 $asktypeid=I('asktypeid');                 $asktitle=I('asktitle');                 $data['askType'] = $asktypeid;                 $data['askTitle'] = $asktitle;                 $data['description'] =$asktitle;                 $data['askTime'] = time();                 $cookie = cookie('bresfwd');                 cookie('bresfwd',"Y",array('expire'=>60));                 if($cookie){                       $this->success('提交过于频繁');                 }                                                   $data['cityId']=$cityId;                 $data['userId'] = $userid;                 $data['isAnswer'] = 'N';                 $data = $db->add($data);                 if ($data) {                     $this->success('提交成功');                 } else {                     $this->success('提交失败');                 }              }                 $this->display();              } js代码:
电话:028-86922220
地址:成都市太升南路288号锦天国际A幢1002号
电话:028-86922220
地址:达州市南岸区弹子石腾龙大道58号2栋21-6
在线咨询
服务热线
服务热线:028-86922220
TOP