这个问题怎么解决,折腾了好久
错误类型:Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/asp/bbs.asp, line 11
code=request.form("code")
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>bbs.asp</title>
</head>
<body>
<% name=request.form("name")
code=request.form("code")---------------------------问题处
subject=request.form("subject")
content=request.form("content")
curdate=Date
curtime=Time
<!-- 与author.mdb连接 -->
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "bbs"
Set RS = Connection.Execute("SELECT * FROM author WHERE authname='" &name& "' AND password='" &code& "'")
<!-- 判断用户名与密码是否匹配 -->
If Not RS.EOF Then
<!-- 打开数据文件,该文件存放帖子的编号,每加一个帖子,编号加1 -->
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set InStream = FileObject.OpenTextFile ("c:inetpubwwwroothospaspdata.id", 1, False, False)
number = Cstr(InStream.Readline+1)
Set OutStream = FileObject.CreateTextFile ("c:inetpubwwwroothospaspdata.id", True, False)
OutStream.WriteLine number
If Request.QueryString("ID")="" Then
manswernum=number
Else
manswernum=Request.QueryString("ID")
End If
If Request.QueryString("topnum")="" Then
mtopnum=number
Else
mtopnum=Request.QueryString("topnum")
End If
Set OutStream = Nothing
<!-- 与bbs.mdb连接,将帖子信息存入数据库中 -->
Set Connbbs = Server.CreateObject("ADODB.Connection")
Connbbs.Open "bbs"
Connbbs.Execute("INSERT INTO bbs(ID,authname,subject,content,adddate,addtime,answernum,topnum,visitnum) Values('" &number& "','"
&name& "','" &subject& "','" &content& "','" &curdate& "','" &curtime& "','" &manswernum& "','" &mtopnum& "',0)")
Connbbs.Close %>
<% =curdate & " " %><% =curtime & " 添加贴子 " %>
<a href="http://localhost/bbs/asp/dispbbs.asp">返回论坛</a><P>
姓名:<% =name %><P>
主题:<% =subject %><P>
内容:<% =content %><P>
<% Else %>
您的用户名或密码出错,请您重输!
<% End If
RS.Close
Connection.Close %>
</body>
</html>