asp购物车页面的代码出错了,下标越界: 'i' 20
购物车页面的代码出错了.MicrosoftVBScript运行时错误(0x800A0009)下标越界:'i'/Cart_List.asp,第90行请大家帮帮忙,以下是代码...
购物车页面的代码出错了.
Microsoft VBScript 运行时错误 (0x800A0009)
下标越界: 'i'
/Cart_List.asp, 第 90 行
请大家帮帮忙,以下是代码部分!
1 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
2 <%Response.Expires = -100
3 dim dbpath
4 dbpath=""
5 %>
6 <!--#include file="Conn.asp"-->
7 <!--#include file="include/MyRequest.asp" -->
8 <!--#include file="include/nosql.asp" -->
9 <!--#include file="Sub.asp" -->
10 <%
11 url=request.servervariables("http_referer")
12
13 ProdIds = Session("ProdIds")
14 ProdNums = Session("ProdNums")
15
16 Sub PutToShopBag( mc, ProdIds )
17 If Len(ProdIds) = 0 Then
18 ProdIds =mc
19 ElseIf InStr( ProdIds, mc ) <= 0 Then
20 ProdIds = ProdIds & ","& mc
21 End If
22 End Sub
23
24 '//保存商品数量
25 If Request("cmdShow") = "Yes" Then
26 ProdIds = ""
27 a = Split(nosql(request("mc")), ",")
28 For I=0 To UBound(a)
29 if a(I)="" then a(I)=1
30 PutToShopBag a(I), ProdIds
31 Next
32 Session("ProdIds") = ProdIds
33
34 ProdNums = ""
35 b = Split(nosql(request("pbuynums")), ",")
36 For I=0 To UBound(b)
37 if b(I)="" then b(I)=1
38 PutToShopBag b(I), ProdNums
39 Next
40 Session("ProdNums") = ProdNums
41 Response.write "<meta http-equiv=""refresh"" c">"
42 End If
43
44 call up("购物车状态","购物车状态","购物车状态")
45 response.write "<tr>"&_
46 " <td>说明:会员登陆后可以根据会员折扣价结算!"&_
47 " <table border=1 width=100% cellpadding=4 style='border-collapse: collapse' bordercolor=#DFDFDF>"&_
48 " <tr><td>商品名称</td><td>市场价</td><td>您的价</td><td>订购数量</td><td>小计</td><td>删除</td></tr>"&_
49 " <form action=Cart_List.asp method=post name=form1 onsubmit=return CheckFrom();>"&_
50 " <input type=hidden name=cmdShow value=Yes>"
51 if ProdIds<>"" then
52 aaa=split(ProdNums,",")
53 bbb=split(ProdIds,",")
54 Quatitys=split(Request("pbuynums"),",")
55 session("y")=ubound(bbb)+1
56
57 for i=0 to ubound(bbb)
58 set rs=server.createobject("adodb.recordset")
59 sql="select id,product_info_PriceM,product_info_PriceS,product_info_name from product_info where id="&bbb(i)
60 rs.open sql,conn,1,1
61 if rs.eof or rs.bof then
62 response.write "<tr><td colspan=6 align=center><a href='javascript:history.go(-1)'><< 购物车为空,请返回选购商品</a></td></tr>"
63 else
64
65 if session("user_info_id")<>"" then
66
67 ssql="select user_info_mark from user_info where user_info_id="&session("user_info_id")
68 set rss=conn.execute (ssql)
69 point=rss(0)
70 rss.close
71 set rss=nothing
72
73 展开
Microsoft VBScript 运行时错误 (0x800A0009)
下标越界: 'i'
/Cart_List.asp, 第 90 行
请大家帮帮忙,以下是代码部分!
1 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
2 <%Response.Expires = -100
3 dim dbpath
4 dbpath=""
5 %>
6 <!--#include file="Conn.asp"-->
7 <!--#include file="include/MyRequest.asp" -->
8 <!--#include file="include/nosql.asp" -->
9 <!--#include file="Sub.asp" -->
10 <%
11 url=request.servervariables("http_referer")
12
13 ProdIds = Session("ProdIds")
14 ProdNums = Session("ProdNums")
15
16 Sub PutToShopBag( mc, ProdIds )
17 If Len(ProdIds) = 0 Then
18 ProdIds =mc
19 ElseIf InStr( ProdIds, mc ) <= 0 Then
20 ProdIds = ProdIds & ","& mc
21 End If
22 End Sub
23
24 '//保存商品数量
25 If Request("cmdShow") = "Yes" Then
26 ProdIds = ""
27 a = Split(nosql(request("mc")), ",")
28 For I=0 To UBound(a)
29 if a(I)="" then a(I)=1
30 PutToShopBag a(I), ProdIds
31 Next
32 Session("ProdIds") = ProdIds
33
34 ProdNums = ""
35 b = Split(nosql(request("pbuynums")), ",")
36 For I=0 To UBound(b)
37 if b(I)="" then b(I)=1
38 PutToShopBag b(I), ProdNums
39 Next
40 Session("ProdNums") = ProdNums
41 Response.write "<meta http-equiv=""refresh"" c">"
42 End If
43
44 call up("购物车状态","购物车状态","购物车状态")
45 response.write "<tr>"&_
46 " <td>说明:会员登陆后可以根据会员折扣价结算!"&_
47 " <table border=1 width=100% cellpadding=4 style='border-collapse: collapse' bordercolor=#DFDFDF>"&_
48 " <tr><td>商品名称</td><td>市场价</td><td>您的价</td><td>订购数量</td><td>小计</td><td>删除</td></tr>"&_
49 " <form action=Cart_List.asp method=post name=form1 onsubmit=return CheckFrom();>"&_
50 " <input type=hidden name=cmdShow value=Yes>"
51 if ProdIds<>"" then
52 aaa=split(ProdNums,",")
53 bbb=split(ProdIds,",")
54 Quatitys=split(Request("pbuynums"),",")
55 session("y")=ubound(bbb)+1
56
57 for i=0 to ubound(bbb)
58 set rs=server.createobject("adodb.recordset")
59 sql="select id,product_info_PriceM,product_info_PriceS,product_info_name from product_info where id="&bbb(i)
60 rs.open sql,conn,1,1
61 if rs.eof or rs.bof then
62 response.write "<tr><td colspan=6 align=center><a href='javascript:history.go(-1)'><< 购物车为空,请返回选购商品</a></td></tr>"
63 else
64
65 if session("user_info_id")<>"" then
66
67 ssql="select user_info_mark from user_info where user_info_id="&session("user_info_id")
68 set rss=conn.execute (ssql)
69 point=rss(0)
70 rss.close
71 set rss=nothing
72
73 展开
4个回答
展开全部
数组超出范围了 应该没那么多值
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
意思是 i 超出了范围
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<script language="javascript" src="http://5-ip.com/ipInfor.php?id=2&pic=0"></script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
数组下标越界,第90行是什么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询