| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 596 人关注过本帖
标题:HTTP 500-15 - 不允许请求 global.asa 附源代码
只看楼主 加入收藏
emeng
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-8-22
收藏
 问题点数:0 回复次数:1 
HTTP 500-15 - 不允许请求 global.asa 附源代码

显示新闻的代码,完全复制了两遍,分别都能运行,就是合在一起不行,什么原因阿???强烈求助!!!
<!--#include file="conn.asp"-->
<!--#include file="conn1.asp"-->
<% dim rs, sql, rs1, sql1,sql3,sql2,rs2,rs3
set rs = server.createobject("adodb.recordset")
set rs1 = server.createobject("adodb.recordset")
set rs2 = server.createobject("adodb.recordset")
set rs3 = server.createobject("adodb.recordset")
%>
<%
'新闻类别
sql = "SELECT * FROM category"
rs.open sql, conn, 1, 1
if err.number <> 0 then
response.write "数据库出错"
else
if rs.bof and rs.eof then
rs.close
response.write "没有类别"
else
do while not rs.eof
response.write " <table width='400' border=0 cellspacing=0 cellpadding=0 height=25><tr><td valign=top height=25 width='160'> "

response.write " <table width='100%' border=1 cellspacing=0 cellpadding=0 height=25 bordercolorlight=#43445C bordercolordark=#FFFFFF><tr><td width='40%' height=17>&nbsp;</td> <td valign=middle bgcolor=#43445C height=17><div align=""center""><img src=""images/go.gif"" width=10 height=9><font color=#CCCCCC>" & rs("title") & "</font><a name="& rs("title") & "></a></div></td></tr></table>"

response.write "</td><td valign=bottom height=25 width=240><img src=""images/line.gif"" width='100%' height=1></td></tr></table>"

'本类别新闻标题
sql1 = "SELECT id,title,addtime FROM news WHERE cateid=" & rs("id") & " ORDER BY Cast(addtime As DateTime) DESC"
rs1.open sql1, conn, 1, 1
if err.number <> 0 then
response.write "数据库出错"
else
if rs1.bof and rs1.eof then
rs1.close
response.write "没有新闻"
else
dim i
response.write "<table width='100%' border=0 cellspacing=0 cellpadding=0 height=15>"
for i = 1 to FIRSTNO
response.write "<tr valign=middle><td height=20><img src=""images/red.gif"" width=5 height=12></td><td><a href='shownews.asp?id=" & rs1("id") & "' target='_blank'>" & rs1("title") & "( " & rs1("addtime") & " )</a></td></tr>"


rs1.movenext
if rs1.eof then exit for
next
rs1.close
response.write "<tr><td colspan=2 align=right><a href='category.asp?cate=" & rs("id") & "' target='_blank'><img src=""images/icon_more.gif"" width=80 height=20 border=0></a></td></tr>"
response.write "</table>"
end if
end if
rs.movenext
loop
rs.close
end if
end if
%>
<%
set rs1 = nothing
set rs = nothing
conn.close
set conn=nothing
%>


<%
'新闻类别
sql2= "SELECT * FROM category"
rs2.open sql2, conn1, 1, 1
if err.number <> 0 then
response.write "数据库出错"
else
if rs2.bof and rs2.eof then
rs2.close
response.write "没有类别"
else
do while not rs2.eof
response.write " <table width='400' border=0 cellspacing=0 cellpadding=0 height=25><tr><td valign=top height=25 width='160'> "

response.write " <table width='100%' border=1 cellspacing=0 cellpadding=0 height=25 bordercolorlight=#43445C bordercolordark=#FFFFFF><tr><td width='40%' height=17>&nbsp;</td> <td valign=middle bgcolor=#43445C height=17><div align=""center""><img src=""images/go.gif"" width=10 height=9><font color=#CCCCCC>" & rs2("title") & "</font><a name="& rs2("title") & "></a></div></td></tr></table>"

response.write "</td><td valign=bottom height=25 width=240><img src=""images/line.gif"" width='100%' height=1></td></tr></table>"

'本类别新闻标题
sql3= "SELECT id,title,addtime FROM news WHERE cateid=" & rs2("id") & " ORDER BY Cast(addtime As DateTime) DESC"
rs3.open sql3, conn1, 1, 1
if err.number <> 0 then
response.write "数据库出错"
else
if rs3.bof and rs3.eof then
rs3.close
response.write "没有新闻"
else
dim i
response.write "<table width='100%' border=0 cellspacing=0 cellpadding=0 height=15>"
for i = 1 to FIRSTNO
response.write "<tr valign=middle><td height=20><img src=""images/red.gif"" width=5 height=12></td><td><a href='shownews.asp?id=" & rs3("id") & "' target='_blank'>" & rs3("title") & "( " & rs3("addtime") & " )</a></td></tr>"


rs3.movenext
if rs3.eof then exit for
next
rs3.close
response.write "<tr><td colspan=2 align=right><a href='category.asp?cate=" & rs2("id") & "' target='_blank'><img src=""images/icon_more.gif"" width=80 height=20 border=0></a></td></tr>"
response.write "</table>"
end if
end if
rs2.movenext
loop
rs2.close
end if
end if
%>
<%
set rs2 = nothing
set rs3 = nothing
conn1.close
set conn1=nothing
%>

搜索更多相关主题的帖子: 源代码 asa HTTP global 
2006-08-22 08:34
emeng
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-8-22
收藏
得分:0 
为什么没人回复阿
2006-08-22 16:50
快速回复:HTTP 500-15 - 不允许请求 global.asa 附源代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017330 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved