| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2889 人关注过本帖
标题:求助,错误类型:Microsoft VBScript 编译器错误 (0x800A03F2) 缺少标识符
只看楼主 加入收藏
zxj7409
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-12-3
收藏
 问题点数:0 回复次数:4 
求助,错误类型:Microsoft VBScript 编译器错误 (0x800A03F2) 缺少标识符
新弄了了网页,注册用户时出现如下错误:
错误类型:
Microsoft VBScript 编译器错误 (0x800A03F2)
缺少标识符
/User_RegPost.asp, line 15, column 3
dim
--^


浏览器类型:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; TheWorld)

网页:
POST 202 ??? /User_RegPost.asp

POST Data:
UserName=&UserTrueName=&Password=&PwdConfirm=&Question=&Answer=&sex=1&Email=&birthyear=&birthmonth=&birthday=&address=&homepage=http%3A%2F%2F&QQ=&msn=&mobile=&Signature=&showre=1&Submit2=+%D7%A2+%B2%E . . .

时间:
2008年12月3日, 16:19:38


详细信息:
Microsoft 支持



user_regpost.asp中代码如下:、
<!--#include file="Inc/func_info.asp"-->
<!--#include file="Inc/md5.asp"-->
<%
if EnableUserReg<>"Yes" then
    FoundErr=true
    ErrMsg=ErrMsg & "<br><li>对不起,本站暂停新用户注册服务!</li>"
    call WriteErrMsg()
    response.end
end if

const ChannelID=2
Const ShowRunTime="Yes"
SkinID=0

dim
RUserName,UserTrueName,Password,PwdConfirm,Question,Answer,Sex,Email,Homepage,QQ,MSN,birthday,birthyear,birthmonth,address,signature,showre,mobile
RUserName=trim(request("UserName"))
UserTrueName=trim(request("usertruename"))
Password=trim(request("Password"))
PwdConfirm=trim(request("PwdConfirm"))
Question=trim(request("Question"))
Answer=trim(request("Answer"))
Sex=trim(Request("Sex"))
Email=trim(request("Email"))
Homepage=trim(request("Homepage"))
if Homepage="http://" or isnull(Homepage) then Homepage=""
QQ=trim(request("QQ"))
MSN=trim(request("MSN"))
birthyear=trim(request("birthyear"))
birthmonth=trim(request("birthmonth"))
birthday=trim(request("birthday"))
address=trim(request("address"))
signature=trim(request("signature"))
showre=trim(request("showre"))
mobile=trim(request("mobile"))

dim CheckNum,CheckUrl
randomize
CheckNum = int(7999*rnd+2000) '随机验证码
CheckUrl=Request.ServerVariables("HTTP_REFERER")
CheckUrl=left(CheckUrl,instrrev(CheckUrl,"/")) & "User_RegCheck.asp?Action=Check&UserName=" & RUserName & "&Password=" & Password & "&CheckNum=" & CheckNum
if RUserName="" or strLength(RUserName)>14 or strLength(RUserName)<4 then
    founderr=true
    errmsg=errmsg & "<br><li>请输入用户名(不能大于14小于4)</li>"
else
      if Instr(RUserName,"=")>0 or Instr(RUserName,"%")>0 or Instr(RUserName,chr(32))>0 or Instr(RUserName,"?")>0 or Instr(RUserName,"&")>0 or Instr(RUserName,";")>0 or Instr(RUserName,",")>0 or Instr(RUserName,"'")>0 or Instr(RUserName,",")>0 or Instr(RUserName,chr(34))>0 or Instr(RUserName,chr(9))>0 or Instr(RUserName,"?")>0 or Instr(RUserName,"$")>0 then
        errmsg=errmsg+"<br><li>用户名中含有非法字符</li>"
        founderr=true
    end if
end if
if Password="" or strLength(Password)>12 or strLength(Password)<6 then
    founderr=true
    errmsg=errmsg & "<br><li>请输入密码(不能大于12小于6)</li>"
else
    if Instr(Password,"=")>0 or Instr(Password,"%")>0 or Instr(Password,chr(32))>0 or Instr(Password,"?")>0 or Instr(Password,"&")>0 or Instr(Password,";")>0 or Instr(Password,",")>0 or Instr(Password,"'")>0 or Instr(Password,",")>0 or Instr(Password,chr(34))>0 or Instr(Password,chr(9))>0 or Instr(Password,"?")>0 or Instr(Password,"$")>0 then
        errmsg=errmsg+"<br><li>密码中含有非法字符</li>"
        founderr=true
    end if
end if
if PwdConfirm="" then
    founderr=true
    errmsg=errmsg & "<br><li>请输入确认密码(不能大于12小于6)</li>"
else
    if Password<>PwdConfirm then
        founderr=true
        errmsg=errmsg & "<br><li>密码和确认密码不一致</li>"
    end if
end if
if Question="" then
    founderr=true
    errmsg=errmsg & "<br><li>密码提示问题不能为空</li>"
end if
if Answer="" then
    founderr=true
    errmsg=errmsg & "<br><li>密码答案不能为空</li>"
end if
if Sex="" then
    founderr=true
    errmsg=errmsg & "<br><li>性别不能为空</li>"
else
    sex=cint(sex)
    if Sex<>0 and Sex<>1 then
        Sex=1
    end if
end if
if Email="" then
    founderr=true
    errmsg=errmsg & "<br><li>Email不能为空</li>"
else
    if IsValidEmail(Email)=false then
        errmsg=errmsg & "<br><li>您的Email有错误</li>"
           founderr=true
    end if
end if
if QQ<>"" then
    if not isnumeric(QQ) or len(cstr(QQ))>20 then
        errmsg=errmsg & "<br><li>QQ号码只能是4-20位数字,您可以选择不输入。</li>"
        founderr=true
    end if
end if
if mobile<>"" then
    if not isnumeric(mobile) or len(cstr(mobile))>12 then
        errmsg=errmsg & "<br><li>手机号必须是数字,不超过11位,您可以选择不输入。</li>"
        founderr=true
    end if
end if
if MSN<>"" then
    if IsValidEmail(MSN)=false then
        errmsg=errmsg & "<br><li>你的MSN有误。</li>"
        founderr=true
    end if
end if

if founderr=false then
    dim sqlReg,rsReg
    sqlReg="select * from " & db_User_Table & " where " & db_User_Name & "='" & RUserName & "'"
    set rsReg=server.createobject("adodb.recordset")
    rsReg.open sqlReg,Conn_User,1,3
    if not(rsReg.bof and rsReg.eof) then
        founderr=true
        errmsg=errmsg & "<br><li>你注册的用户已经存在!请换一个用户名再试试!</li>"
    else
        rsReg.addnew
        rsReg(db_User_Name)=RUserName
        rsReg(db_User_Password)=md5(Password)
        rsreg(db_user_truename)=usertruename
        rsReg(db_User_Question)=Question
        rsReg(db_User_Answer)=md5(Answer)
        rsReg(db_User_Sex)=Sex
        rsReg(db_User_Email)=Email
        rsReg(db_User_Homepage)=Homepage
        rsReg(db_User_QQ)=QQ
        rsReg(db_User_Msn)=MSN
        rsReg(db_User_RegDate)=Now()
        rsReg(db_User_ArticleCount)=0
        rsReg(db_User_ArticleChecked)=0
        rsReg(db_User_LoginTimes)=1
        rsReg(db_User_LastLoginTime)=NOW()
        rsReg(db_User_ChargeType)=ChargeType_999
        rsReg(db_User_UserPoint)=UserPoint_999
        rsReg(db_User_BeginDate)=formatdatetime(now(),2)
        rsReg(db_User_Valid_Num)=ValidDays_999
        rsReg(db_User_Valid_Unit)=1

        rsReg(db_User_address)=address
        rsReg(db_User_sign)=signature
        rsReg(db_User_showre)=showre
        rsReg(db_User_mobile)=mobile
        if len(birthyear&birthmonth&birthday)>1 then
          rsReg(db_User_Birthday)=dateserial(cint(birthyear),cint(birthmonth),cint(birthday))
        end if
        if EmailCheckReg="Yes" then
            rsReg(db_User_UserLevel)=3000
            call SendRegEmail()
        else
            if AdminCheckReg="Yes" then
                rsReg(db_User_UserLevel)=2000
            else            
                rsReg(db_User_UserLevel)=999
                Response.Cookies(CookiesName)("UserName")=RUserName
                Response.Cookies(CookiesName)("Password") =md5(Password)
                Response.Cookies(CookiesName)("UserLevel")=999
            end if
        end if        

          rsReg.update
    end if
    rsReg.close
    set rsReg=nothing
end if        
PageTitle="注册成功"
%>
<html>
<head>
<title><%=strPageTitle & " - " & PageTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="inc/Skin_CSS.asp"-->
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="Top.asp"-->
<table width="100%" height="300" border="0" align="center" cellpadding="0" cellspacing="0" class="border2">
  <tr>
    <td width="180" valign="top" class="tdbg_leftall"><TABLE cellSpacing=0 cellPadding=0 width="100%" border="0" style="word-break:break-all">
        <TR class="title_left">
          <TD align="center"><table width="180" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" class="title_maintxt">注册 <%=SiteName%></td>
              </tr>
            </table></TD>
        </TR>
        <TR>
          <TD height="80" valign="top" class="tdbg_left"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
              <tr>
                <td valign="top"><br> <b>&nbsp;&nbsp;注册步骤</b><br> &nbsp;&nbsp;一、阅读并同意协议<font color="#FF0000">√</font><br>
                  &nbsp;&nbsp;二、填写注册资料<font color="#FF0000">√</font><br> &nbsp;&nbsp;三、完成注册<font color="#FF0000">→</font></td>
              </tr>
            </table></TD>
        </TR>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdbg_left"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="11" Class="title_left2"></td>
              </tr>
            </table></td>
        </tr>
      </table>
      
    </td>
    <td width=5></td>
    <td width="575" align="center" valign=top><table width="100%" height="280" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td> <div align="center">
              <%
if founderr=false then
    call RegSuccess()
else
    call WriteErrmsg()
end if
%>
              <br>
              <br>
            </div></td>
        </tr>
      </table>
    </td>
  </tr>
</table>


<%
call Bottom()
%>
</body>
</html>
<%
call CloseConn
call CloseConn_User

sub WriteErrMsg()
    response.write "<br><br><table align='center' width='300' border='0' cellpadding='2' cellspacing='0' class='border'>"
    response.write "<tr class='title'><td align='center' height='22'>由于以下的原因不能注册用户!</td></tr>"
    response.write "<tr class='tdbg'><td align='left' height='100'><br>" & errmsg & "<p align='center'>【<a href='javascript:onclick=history.go(-1)'>返 回</a>】<br></p></td></tr>"
    response.write "</table>"
end sub

sub RegSuccess()
    response.write "<br><br><table align='center' width='300' border='0' cellpadding='2' cellspacing='0' class='border'>"
    response.write "<tr class='title'><td align='center' height='22'>成功注册用户!</td></tr>"
    response.write "<tr class='tdbg'><td align='left' height='100'><br>你注册的用户名:" & RUserName & "<br>"
    if EmailCheckReg="Yes" then
        response.write "系统已经发送了一封确认信到你注册时填写的信箱中,你必须在收到确认信并通过确认信中链接进行确认后,你才能正式成为本站的注册用户。"
    else
        if AdminCheckReg="Yes" then
            response.write "请等待管理通过你的注册申请后,你就可以正式成为本站的注册用户了。"
        else            
            response.write "欢迎您的加入!!!"
        end if
    end if        
    response.write "<p align='center'>【<a href='javascript:onclick=window.close()'>关 闭</a>】<br></p></td></tr>"
    response.write "</table>"
end sub

sub SendRegEmail()
    dim MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority
    MailtoAddress=Email
    MailtoName=RegUserName
    Subject="注册确认信"
    MailBody="这是一封注册确认信。你的验证码是:" & CheckNum & vbcrlf & "<br>请点此进行确认:<a href='" & CheckUrl & "'>" & CheckUrl & "</a>"
    FromName=SiteName
    MailFrom=WebmasterEmail
    Priority=3
    ErrMsg=SendMail(MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority)
    if ErrMsg<>"" then FoundErr=True
end sub
%>
搜索更多相关主题的帖子: Microsoft VBScript 类型 编译 
2008-12-03 16:26
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:0 
dim
RUserName,UserTrueName,Password,PwdConfirm,Question,Answer,Sex,Email,Homepage,QQ,MSN,birthday,birthyear,birthmonth,address,signature,showre,mobile
你应该换行了 改为
dim RUserName,UserTrueName,Password,PwdConfirm,Question,Answer,Sex,Email,Homepage,QQ,MSN,birthday,birthyear,birthmonth,address,signature,showre,mobile

[[it] 本帖最后由 aspic 于 2008-12-3 22:05 编辑 [/it]]
2008-12-03 22:03
zxj7409
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-12-3
收藏
得分:0 
首先谢谢您的指导,其次我按照你的指导做了,可又出现了如下错误,我检查了一遍,也没看出是哪出错了。
错误类型:
Microsoft VBScript 编译器错误 (0x800A0411)
名称重定义
/User_RegPost.asp, line 15, column 14
dim RUserName,UserTrueName,Password,PwdConfirm,Question,Answer,Sex,Email,Homepage,QQ,MSN,birthday,birthyear,birthmonth,address,signature,showre,mobile
-------------^


浏览器类型:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; TheWorld)

网页:
POST 202 ??? /User_RegPost.asp

POST Data:
UserName=&UserTrueName=&Password=&PwdConfirm=&Question=&Answer=&sex=1&Email=&birthyear=&birthmonth=&birthday=&address=&homepage=http%3A%2F%2F&QQ=&msn=&mobile=&Signature=&showre=1&Submit2=+%D7%A2+%B2%E . . .

时间:
2008年12月4日, 8:32:29


详细信息:
Microsoft 支持
2008-12-04 09:10
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
你这一句里有重复定义的变量,所以报错了,把这一句先注释掉再试试程序有无错误
2008-12-04 10:00
zxj7409
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-12-3
收藏
得分:0 
谢谢,我将他们逐个注释掉,终于成功了,谢谢。
2008-12-04 10:29
快速回复:求助,错误类型:Microsoft VBScript 编译器错误 (0x800A03F2) 缺少标 ...
数据加载中...
 
   



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

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