这里是文章模块栏目内容页
织梦(dede) 防止自定义表单恶意提交

首先打开plus下diy.php文件

找打大概55行

if(!is_array($diyform))
        {
            showmsg('自定义表单不存在', '-1');
            exit();
        }

再其下放添加

//检测游客是否已经提交过表单
        if(isset($_COOKIE['VOTE_MEMBER_IP']))
        {
            if($_COOKIE['VOTE_MEMBER_IP'] == $_SERVER['REMOTE_ADDR'])
            {
                ShowMsg('您已经填写过表单啦','-1');
                exit();
            } else {
                setcookie('VOTE_MEMBER_IP',$_SERVER['REMOTE_ADDR'],time()*$row['spec']*3600,'/');
            }
        } else {
            setcookie('VOTE_MEMBER_IP',$_SERVER['REMOTE_ADDR'],time()*$row['spec']*3600,'/');
        }

如下图

QQ%E6%88%AA%E5%9B%BE20210319205315