民宿名字英文:ASP 网页程序代码问题,求教高人!! 急~~

来源:百度文库 编辑:中科新闻网 时间:2024/05/11 05:02:45
这是个留言系统~ 不知道为什么,现在一运行就会出现

“内部服务器错误500”

请大家帮忙,帮我读下,究竟哪里错了,我实在找不出~

<!-- #include file="conn.asp" --><!--#include file="inc/config.asp"-->
<!--#include file="inc/function.asp"-->
<%
dim UserID,UserName,id,Content
UserID=session("UserID")
UserName=session("UserName")

set rs=server.createobject("adodb.recordset")
sql="select * from Comment"
rs.open sql,conn,1,3

If UserName="" or IsNull(WordID) Then
Response.Write ("<script>alert(' 操作错误! \n\n 可能您还没有登陆或者登陆超时! \n\n 如果您没有成为会员请先进行会员注册! \n\n 如果您已经是注册会员请重新登陆! ');history.back();</script>")
Response.End
End If
id=request("id")
Content=trim(Request.Form("Content"))
If Content="" Then
Response.Write ("<script>alert(' 操作错误! \n\n 请输入评论内容!~ ');history.back();</script>")
Response.end
elseIf strLength(Content)>100 then
Response.Write ("<script>alert(' 操作错误! \n\n 您输入的评论内容大于50字!~ ');history.back();</script>")
Response.end
End If

time_limit=30'设置限制时间秒
lastpost_time=request.cookies("lastpost_time")
if lastpost_time<>"" then'先判断是否有发言过,关了ie,时间没保存在cookies里.
lastpost=cdate(lastpost_time)'转换为日期类型
canbe_post=datediff("s",lastpost_time,now()) '这个是正值
else
canbe_post=time_limit+1
end if
if canbe_post <= time_limit then
response.write ("<script>alert(' 操作错误! \n\n 您还需休息:"&time_limit-canbe_post&"秒 ');history.back();</script>")
response.end
end if

Response.Cookies("lastpost_time")=now()

rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing

Stats=" 会 员 参 加 评 论 反 馈 信 息 "
%>
<script>
alert(' 操作成功! \n\n 感谢您参与书评^_^ ');history.back();

</script>
<p> </p>
补充

去掉
rs.update

这句的话,就没有错误了,可以正常提示操作成功了!
可是数据库并没有写入东西!!!

rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
这上面什么都没有操作,怎么就用rs.update了?
你调试的时候最好用本地的服务器,不要用网上的服务器,因为自己服务器上调试的时候错误的信息很详细,再说你提问的时候要把相关的文件帖出来啊,不然大家就瞎猜了。

换一台机看看

你都没有rs("字段")=xxx