asp权限控制

来源:百度知道 编辑:UC知道 时间:2024/06/19 14:18:53
check.asp
session("Purview")=split(trim(rs("Purview")),",")

lefttree.asp
<% i=session("Purview")
for j=0 to cint(UBound(i))
if i(j)=1
then %>
<table cellspacing="0" cellpadding="0" width="158" align="center">
……
</table><%end if next%>
数据库中权限记录为1,2,3分别代表不同种类

报错
缺少 'Then'
/11/admin/LeftTree.asp, line 48, column 9
if i(j)=1

这句错了,应该是在一行.
if i(j)=1
then %>
改为:
if i(j)=1 then %>

该换行的没换,不该换的反而换了
改为:
<% i=session("Purview")
for j=0 to cint(UBound(i))
if i(j)=1 then %>
<table cellspacing="0" cellpadding="0" width="158" align="center">
……
</table>
<%end if
next
%>