首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

这段代码是不是有死循环啊高手来帮忙啊该如何处理

2012-03-21 
这段代码是不是有死循环啊?高手来帮忙啊~!!--#includefile security.asp --%ifsession( flag ) 1

这段代码是不是有死循环啊?高手来帮忙啊~!
<!--#include   file= "security.asp "-->
<%if   session( "flag ")> 1   then
        response.write   " <br> <p   align=center> 您的操作权限不够! </p> "
        response.end
end   if
%>
<!--#include   file= "articleconn.asp "-->
<html>

<head>
<meta   http-equiv= "Content-Language "   content= "zh-cn ">
<meta   name= "GENERATOR "   content= "Microsoft   FrontPage   5.0 ">
<meta   name= "ProgId "   content= "FrontPage.Editor.Document ">
<title> 用户管理 </title>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<style   type=text/css>
body     {   background:#799AE1;   margin:0px;   font:9pt   宋体;   }
table     {   border:0px;   }
td     {   font:normal   12px   宋体;   }
img     {   vertical-align:bottom;   border:0px;   }
a     {   font:normal   12px   宋体;   color:#000000;   text-decoration:none;   }
a:hover     {   color:#428EFF;text-decoration:underline;   }
.sec_menu     {   border-left:1px   solid   white;   border-right:1px   solid   white;   border-bottom:1px   solid   white;   overflow:hidden;   background:#D6DFF7;   }
.menu_title     {   }
.menu_title   span     {   position:relative;   top:2px;   left:8px;   color:#215DC6;   font-weight:bold;   }
.menu_title2     {   }
.menu_title2   span     {   position:relative;   top:2px;   left:8px;   color:#428EFF;   font-weight:bold;   }
</style>

</head>

<%
      Set   rs=Server.CreateObject( "Adodb.RecordSet ")
     
      sql= "select   *   from   password   order   by   id "
     
      rs.Open   sql,conn,1,1
%>
<body   bgcolor= "#E8E8E8 "   topmargin= "1 "   leftmargin= "2 ">

<div   align= "center ">
  <p> <font   color= "#FFFFFF "> 修改管理员信息 </font>   |   <a   href= "adduser.asp "> 增加管理员 </a> </p>
    <table   width= "500 "   border= "0 "   cellspacing= "1 "   cellpadding= "4 ">
        <tr   bgcolor= "#145f74 ">
            <td   height= "9 "   width= "120 "   style= "font-weight:   bold;   color:   maroon;   border-left-style:   none;   border-right-style:   none;   border-top-style:   none;   border-bottom:   .75pt   solid   gray;   background-color:   silver ">
            <div   align= "center ">
                用户名 </div>
            </td>
            <td   height= "9 "   width= "120 "   style= "font-weight:   bold;   color:   maroon;   border-left-style:   none;   border-right-style:   none;   border-top-style:   none;   border-bottom:   .75pt   solid   gray;   background-color:   silver ">


            <div   align= "center ">
                密码 </div>
            </td>
            <td   height= "9 "   width= "100 "   style= "font-weight:   bold;   color:   maroon;   border-left-style:   none;   border-right-style:   none;   border-top-style:   none;   border-bottom:   .75pt   solid   gray;   background-color:   silver ">
            <div   align= "center ">
                权限 </div>
            </td>
            <td   height= "9 "   width= "130 "   style= "font-weight:   bold;   color:   maroon;   border-left-style:   none;   border-right-style:   none;   border-top-style:   none;   border-bottom:   .75pt   solid   gray;   background-color:   silver ">
            <div   align= "center ">
                操作 </div>
            </td>
        </tr>
        <%do   while   not   rs.EOF   %>
        <form   method= "post "   action= "asaveuser.asp "   style= "margin:0 ">
            <tr   bgcolor= "#145f74 ">
                <td   height= "8 "   width= "120 "   style= "color:   black;   border-style:   none "   bgcolor= "#F0F0F0 "   align= "center ">
                <input   type= "text "   name= "manager "   value= " <%=rs( "name ")%> "   size= "12 ">
                <input   type= "hidden "   name= "id "   value= " <%=rs( "id ")%> "   size= "12 "> </td>
                <td   height= "8 "   width= "120 "   style= "font-weight:   normal;   color:   black;   border-style:   none;   background-color:   #F0F0F0 "   align= "center ">
                <input   name= "newpin "   size= "12 ">   </td>
                <td   height= "8 "   width= "100 "   style= "font-weight:   normal;   color:   black;   border-style:   none;   background-color:   #F0F0F0 "   align= "center ">
                <select   size= "1 "   name= "flag ">
                <option   <%if   rs( "flag ")=3   then%>   selected   <%end   if%>   value= "3 "> 初级管理员
                </option>


                <option   <%if   rs( "flag ")=2   then%>   selected   <%end   if%>   value= "2 "> 高级管理员
                </option>
                <option   <%if   rs( "flag ")=1   then%>   selected   <%end   if%>   value= "1 "> 超级管理员
                </option>
                <option   <%if   rs( "flag ")=4   then%>   selected   <%end   if%>   value= "4 "> 无管理权限
                </option>
                </select>   </td>
                <td   height= "8 "   width= "130 "   style= "font-weight:   normal;   color:   black;   border-style:   none;   background-color:   #F0F0F0 "   align= "center ">
                <input   type= "submit "   name= "Submit "   value= "修改 "> &nbsp;
                <input   type= "submit "   name= "Submit "   value= "删除 ">   </td>
            </tr>
        </form>
        <%    
          rs.MoveNext
         
          loop
    %>
    </table>
    <%
    rs.Close
    set   rs=Nothing
   
    conn.Close
    set   conn=Nothing
%>

[解决办法]
<!--#include file= "security.asp "-->

<!--#include file= "articleconn.asp "-->

主要看一下你包含的那两个文件有没有问题 ,这个页面没注意到

有时候一些代码一被包含就有可以组合成死循环

热点排行