ASP禁止站外提交表单(不允许从外部提交数据)
分类:程序开发 Tags: asp 禁止 评论:0 浏览:5758 最近更新时间:2010/11/4 15:32:35
先将下面的代码复制保存为check_path.asp
ASP代码:
然后在表单提交页引用即可
ASP代码:
ASP代码:
- <%
- server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
- server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
- if mid(server_v1,8,len(server_v2))<>server_v2 then
- response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
- response.write "<tr><td style='font:9pt Verdana'>"
- response.write "你提交的路径有误,禁止从站点外部提交数据请不要乱改参数!"
- response.write "</td></tr></table></center>"
- response.end
- end if
- %>
然后在表单提交页引用即可
ASP代码:
- <!--#include file="check_path.asp"-->
本文地址:/485/
-
• asp检测email地址是否有效函数
• ASP抽取数据的执行效率
• 在文章内容中随机插入网站版权文字,防止采集
• ASP过滤SQL非法字符并格式化html代码,不错的功能函数集
• centos系统挂载数据盘方法
• ASP Access数据库连接关闭与.ldb文件锁定解决方法
• 中国十大ASP CMS系统介绍
• MySQL报Field‘***’doesn’t have a default value错误的解决办法
• UEditor百度编辑器在html代码模式无法更新内容的解决办法
• ASP在线创建ACCESS表或添加字段代码