dedecms恶意注册与发广告文章的解决办法
<p><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>具体方法是:在member 目录下面的index.php , reg_new.php文件里面加上来路的判断,代码为 </span></p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<p class="right">
<span><u>复制代码</u></span></p>
<p>
代码如下:</p>
</div>
<p class="msgborder" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
<?php <br>
if( stristr ($_SERVER['HTTP_REFERER'],"你的域名")) { <br>
原文件php代码的正文 <br>
} <br>
else { <br>
ShowMsg('请注意,非法操作!', 'index.php'); <br>
exit(); <br>
} <br>
?> </p>
<p>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>当然了,你还可以修改member下面的article_add.php 等文件。 </span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>这段代码的意思是判断访问来路是不是来自于自已的网站,如果是,就按原来的程序执行正常的注册,或登陆,如果不是,则返回member主页,当然了你也可以修改为你网站的首页。</span></p>
頁:
[1]