asp系列(一):request对象的Cookies集合调试错误

来源:互联网 发布:pc屏幕同步软件 编辑:程序博客网 时间:2024/05/22 21:17

代码如下

<%
dim user
   user=request.Cookies("user")
   if len(user)>0 then
        response.Write(user& "您好,这是您的"& request.Cookies("vtime")& "次访问本站<hr>")
  response.Write("您是:"& request.Cookies("user"))
  response.Write("<br>上次访问时间:"& request.Cookies("date"))
  response.Cookies("vtime")=cint(request.Cookies("vtime")+"1")      ‘行17
  else
%>

浏览错误

阿斯顿飞您好,这是您的次访问本站


您是:阿斯顿飞
上次访问时间:2010/8/13 20:25:32 错误 '800a000d'

Microsoft VBScript 运行时错误

类型不匹配: '[string: ""]'

/Untitled-1.asp,行 17

解决方法:

把行17中的1加上双引号就OK了!

可是又出现其他问题了,每次浏览都是
上次的页面,代码的功能应该是没重新打开一次就显示登陆界面的,可刷新多了就出现如下错误了
阿斯顿飞您好,这是您的18111次访问本站
--------------------------------------------------------------------------------
您是:阿斯顿飞
上次访问时间:2010/8/13 20:25:32
Microsoft VBScript 运行时错误 错误 '800a0006'

溢出: 'cint'

/Untitled-1.asp,行 17

还在困惑中,求教……