今天是:

注册会员|会员登陆|设为首页|加入收藏|广告服务|韩文翻译|RSS阅读|繁體中文

您现在的位置: 韩国设计资源网 >> 设计师学院 >> 语言开发 >> ASP专区 >> 教程正文

ASP实现简单的网页保护

  • 作者:未知 文章来源:ASP酷网 点击数: 更新时间:2006-4-11 10:31:11 用户收藏

主要使用request对象的ServerVariables属性,通过它来获得环境变量的值。使用的语法为:Request.ServerVariables(variable),“variable”表示环境变量的名称,如服务器主机名称、Web服务器软件名等等,若“variable”为“REMOTE_ADDR”则表示访问者的IP地址,通过它就可以实现IP地址的过滤。
   源程序如下:(文件名:demo.ASP)

   <html>
   <head>
   <meta http-equiv=“Content-Type” content=“text/html; charset=gb_2312-80”>
   <meta name=“GENERATOR” content=“Microsoft FrontPage Express 2.0”>

   <style>
   <!--
   .as{ line-height: 15px; font-size: 9pt }
   a:hover {color: rgb(0,51,240);text-decoration:underline}
   .p9 { font-family: “宋体”; font-size: 9pt; line-height: 15pt}
   .p12 { font-family: “宋体”; font-size: 12pt; line-height: 18pt}
   a:link { text-decoration: none;}
   a:visited { text-decoration:none;}
   a:hover {text-decoration: underline;font-size: 125%;color:blue}
   -->
   </style>

[1] [2] [3] 下一页