温柔网

 找回密码
 注册

查看: 565|回复: 0

页面权限控制

[复制链接]
发表于 2003-11-6 23:20:08 | 显示全部楼层 |阅读模式
<%@ Language=VBScript %>
<html>
<title>
本站主页
</title>
<body>
<%
&#39;本例根据远程主机地址来进行判断,如果为本地
&#39;地址则进入欢迎页面,否则显示出错信息.
dim address
address = request.servervariables("REMOTE_ADDR")
if address="127.0.0.1" then
    &#39;如果为本地,则显示欢迎页面.
    response.write "你好,欢迎进入本站点."
else
    &#39;否则显示出错信息.
    response.write "对不起,你无权查看内部站点."
end if
%>
</body>
</html>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|温柔网 ( 浙ICP备13033583号-8 )

GMT+8, 2024-5-8 18:10 , Processed in 0.033645 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表