| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 635 人关注过本帖
标题:帮忙分析一下吧!
只看楼主 加入收藏
orangedo
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2005-5-11
收藏
 问题点数:0 回复次数:2 
帮忙分析一下吧!
这个是bbs里面发帖子的一个简单的程序,可是在IIS里面浏览运行的时候确跳到了我的index页面。 <!--#include file="../includes/conn_SQLServer.asp"--> <!--#include file="../includes/generalTools.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta http-equiv="Content-Language" content="zh-cn"> <title>BBS-撰写</title> <script language="JavaScript"><!-- function validateCompose(){ var ITEM_TITLE = document.frmCompose.ITEM_TITLE.value; var ITEM_CONTENT = document.frmCompose.ITEM_CONTENT.value; if (ITEM_TITLE ==""){ alert("必须填写标题!"); return false; } if (ITEM_CONTENT ==""){ alert("必须填写内容!"); return false; } } --> </script> </head> <body> <% insureID %> <div align=center> <form name="frmCompose" method="POST" action="saveCMRD.asp" onSubmit="javaScript:return validateCompose()"> <br><br><br> <table border="0" width=400 bgcolor="#efefef" cellspacing="0" cellpadding="0"> <tr bgcolor="#766DE4"> <td width="100%" align=center colspan="2" height="30"> <font color="#FFFFFF"><b>撰写帖子</b></font></td> </tr> <tr> <td width="20%" bgcolor="#FCFCFC" align=right>标题:&nbsp;</td> <td width="80%" bgcolor="#FCFCFC"> <input type="text" name="ITEM_TITLE" size="35" maxlength="30"> </td> </tr> <tr> <td width="20%" bgcolor="#FCFCFC" align=right>内容:&nbsp;</td> <td width="80%" bgcolor="#FCFCFC"> <textarea rows="8" name="ITEM_CONTENT" cols="34"> </textarea> </td> </tr> <tr> <td width="20%" bgcolor="#FCFCFC" align=right>撰写人:&nbsp; </td> <td width="80%" bgcolor="#FCFCFC"> <%="<font color=#FF0000>"&session("USER_NAME")&"</font>"%> </td> </tr> <tr bgcolor="#766DE4"> <td width="100%" height="50" colspan="2" align=center> <input type="hidden" value="Compose" name="action"> <input type="submit" value="提交" name="submit">&nbsp;&nbsp; <input type="reset" value="重置" name="reset"></td> </tr> </table> </div> </form> </body> </html>
搜索更多相关主题的帖子: IIS meta ITEM content 
2005-05-21 10:29
orangedo
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2005-5-11
收藏
得分:0 

这是浏览帖子的代码,我已经手动向数据库中添加数据了,可是运行之后,确没有浏览到,请问是哪里的问题啊? <!--#include file="../includes/ADOVBS.inc"--> <!--#include file="../includes/conn_SQLServer.asp"--> <!--#include file="../includes/generalTools.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>BBS-浏览</title> </head>

<body> <center> <table border="0" width="100%" height="50" cellspacing="0" cellpadding="0"> <tr> <td width="100%"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#766DE4" height="35" align=center> <b><font color="#FFFFFF">浏览留言</font></b></td> </tr> </table> <table border="1" width="100%" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" bgcolor="#EFEFEF"> <tr align=center> <td width="5%" bgcolor="#EFEFEF">编号</td> <td width="5%" bgcolor="#FCFCFC">人气</td> <td width="5%" bgcolor= "#EFEFEF">回复</td> <td width="35%" bgcolor="#FCFCFC">主题</td> <td width="15%" bgcolor="#EFEFEF">撰写日期</td> <td width="10%" bgcolor= "#FCFCFC">作者</td> <td width="15%" bgcolor="#EFEFEF">最新回复</td> <td width="10%" bgcolor="#FCFCFC" >回复人</td> </tr> <% sql="SELECT BBSItems.ITEM_ID, BBSItems.ITEM_TITLE, "_ &"BBSItems.COMPOSE_DATE, "_ &"BBSItems.IS_ORIGIONAL, BBSItems.AUTHOR, BBSItems.REPLYD_TIMES, "_ &"BBSItems.BROWSED_TIMES, BBSItems.LATEST_REPLICATION_ID, "_ &"BBSItems_1.COMPOSE_DATE AS LATEST_REPLICATION_DATE, "_ &"BBSItems_1.AUTHOR AS LATEST_REPLYER "_ &"FROM BBSItems INNER JOIN BBSItems BBSItems_1 "_ &"ON BBSItems.ITEM_ID = BBSItems_1.FATHERS_ID AND "_ &"BBSItems.LATEST_REPLICATION_ID = BBSItems_1.ITEM_ID "_ &"WHERE BBSItems.IS_ORIGIONAL = 1" openDB rs.open sql,conn,adOpenStatic,adLockReadOnly if rs.eof then showMsg("还没有任何留言!&nbsp;&nbsp;"_ &"[<a href='Compose.asp'>撰写留言</a>]") end if

rs.PageSize=18 dim absolutePage absolutePage=request.QueryString("absolutePage") if absolutePage="" then absolutePage=1 elseif absolutePage<0 or absolutePage>rs.PageCount then trigErr end if rs.AbsolutePage=absolutePage

dim ITEM_TITLE dim i for i=1 to rs.PageSize if rs.Eof then exit for end if ITEM_TITLE=rs("ITEM_TITLE") ITEM_TITLE=replaceBack(ITEM_TITLE) response.write"<tr align=center>" response.write"<td width='5%' bgcolor='#EFEFEF'>"_ &rs("ITEM_ID")&"</td>" response.write"<td width='5%' bgcolor='#FCFCFC'>"_ &rs("BROWSED_TIMES")&"</td>" response.write"<td width='5%' bgcolor='#EFEFEF'>"_ &rs("REPLYD_TIMES")&"</td>" response.write"<td width='35%' bgcolor='#FCFCFC'>" response.write"<a href='Read.asp?ITEM_ID="&rs("ITEM_ID")&"'>"&ITEM_TITLE&"</a></td>" response.write"<td width='15%' bgcolor='#EFEFEF''>"_ &rs("COMPOSE_DATE")&"</td>" response.write"<td width='10%' bgcolor='#FCFCFC'>"_ &rs("AUTHOR")&"</td>" if rs("ITEM_ID")=rs("LATEST_REPLICATION_ID") then response.write"<td width='15%' bgcolor='#EFEFEF'>无</td>" response.write"<td width='10%' bgcolor='#FCFCFC'>无</td>" else response.write"<td width='15%' bgcolor='#EFEFEF'>"_ &rs("LATEST_REPLICATION_DATE")&"</td>" response.write"<td width='10%' bgcolor='#FCFCFC'>"_ &rs("LATEST_REPLYER")&"</td>" end if response.write"</tr>" rs.movenext next %> <tr> <td width="100%" colspan=9 align=center height="50" bgcolor="#EFEFEF"> <% dim color for i=1 to rs.PageCount if i=absolutePage then color="#000000" response.write "<font color="&color&">"&i&"</font>&nbsp;" else ScriptName=request.ServerVariables("script_name") response.write "<a href="&ScriptName _ &"?absolutePage="&i&">"&i&"</font>&nbsp;" end if next closeDB response.write "<br>" if Err<>0 then trigErr end if if session("USER_NAME")<>"" then response.write"[<a href='Compose.asp'>撰写留言</a>]&nbsp;&nbsp;" end if %> [<a href="../link.asp">返回</a>] </tr> </table> </center> </body> </html>

2005-05-21 10:33
orangedo
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2005-5-11
收藏
得分:0 
你用什么工具调试asp程序啊,我都是用dreamweaver写出来,执行看出什么错误?指点一下
2005-05-21 13:08
快速回复:帮忙分析一下吧!
数据加载中...
 
   



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

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