ASP做登陆,如果限制只有正常登陆才能进入下一页

2025-02-28 00:12:13
推荐回答(2个)
回答1:

在index.asp里使用session查看.有记录就可以打开.没有就跳到login.asp.
这段写在index.asp最前.
<%
if session("username")="" then
response.redirect ("路径与文件名")
end if
%>

回答2:

用session隔绝其他来源,只有session为某值时,才可以登陆,通过index.asp来源的 不给定义session就可以了