迅睿开源框架是一款PHP8高性能·简单易用的PHP开源开发框架, 基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
定义了的模块表单,怎么判断用户提交过这个内容对应的表单
public function post() { if (IS_POST) { // 这里表示提交之前 $post = \Phpcmf\Service::L('input')->post('data'); if (\Phpcmf\Service::M()->table($this->init['table']) ->where('cid', $this->index['id']) ->where('title', $post['title'])->counts()) { $this->_json(0, '不能重复提交'); } } $this->_Home_Post(); }
public function post() { if (IS_POST) { // 这里表示提交之前 $post = \Phpcmf\Service::L('input')->post('data'); if (\Phpcmf\Service::M()->table($this->init['table']) ->where('cid', $this->index['id']) ->where('title', $post['title'])->counts()) { $this->_json(0, '不能重复提交'); } } $this->_Home_Post(); }