| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 938 人关注过本帖
标题:win2003中是不是不支持session?在win2003中会出现的问题,在winxp中却不会出 ...
只看楼主 加入收藏
deernet
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-9-10
收藏
 问题点数:0 回复次数:2 
win2003中是不是不支持session?在win2003中会出现的问题,在winxp中却不会出现
我在网站上遇到了这么一个问题。我的购物车系统一直运行很正常。后来自己架设了服务器,系统是win2003,购物车出现了异常,实在不知道哪里的问题,请高手帮忙!

我选中某个商品,点击“购买商品”,在win2003系统中转到“购物车为空”的界面。正常情况下应该是转到购物车内商品列表的界面。但是在winxp系统下就不会出现这种异常,可以正确的转到购物车内商品列表的界面。这是为什么??
以下是点击“购买商品”后的界面代码,请高手指教。
<% if request("cpid")="" then
response.write "<br>出错了,请确认您的链接来自本网站"
response.end
end if
Set s = Server.CreateObject("abodb.recordset")
conn.execute("Delete ls_cart where datediff(n,sj,getdate())>200")
conn.execute("Delete ls_userid where datediff(n,sj,getdate())>200")
if session.sessionid="" then
Response.Write("<script>alert(""本网站购物系统需要cookies的支持,请先调整您的浏览器设置!"");history.back();</script>")
end if
if request("cpid")<>"" and session.sessionid<>"" then
set rs = conn.execute("select * from chanpin where id="&clng(request("cpid"))&"")
if not rs.eof then
mc=rs("mc")
userid=rs("userid")
jg1=rs("jg1")
jg2=rs("jg2")
rs.close
end if
set rs = conn.execute("select * from ls_cart where cpid="&clng(request("cpid"))&" and sessionid="&session.sessionid&"")
if rs.eof then
Set s = Server.CreateObject("abodb.recordset")
conn.execute("Insert into ls_cart(cpid,mc,jg1,jg2,userid,sessionid,sj)values("&clng(request("cpid"))&",'"&mc&"',"&jg1&","&jg2&","&userid&","&session.sessionid&",'"&now()&"')")
set rs1 = conn.execute("select * from ls_userid where userid="&userid&" and sessionid="&session.sessionid&"")
if rs1.eof then
conn.execute("Insert into ls_userid(userid,sessionid,sj)values("&userid&","&session.sessionid&",'"&now()&"')")
else
Set s = Server.CreateObject("abodb.recordset")
conn.execute("Update ls_userid set sj='"&now()&"' where userid="&userid&" and sessionid="&session.sessionid&"")
end if
rs1.close
else
conn.execute("Update ls_cart set sl=sl+1,sj='"&now()&"' where cpid="&clng(request("cpid"))&" and sessionid="&session.sessionid&"")
conn.execute("Update ls_userid set sj='"&now()&"' where userid="&userid&" and sessionid="&session.sessionid&"")
end if
rs.close
Response.redirect "cart.asp"
end if
%>
搜索更多相关主题的帖子: session winxp 
2007-09-10 16:09
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
哪本书告诉你win2003中不支持session了?

没时间看你代码。你都不写注释的?
2007-09-11 13:16
shaoli4261
Rank: 3Rank: 3
来 自:安徽.巢湖
等 级:新手上路
威 望:6
帖 子:212
专家分:0
注 册:2007-9-11
收藏
得分:0 
楼上说的对,对变量也不注释,怎么能看的懂的!养成良好的编程习惯!

爱一个人,不一定拥有她,但拥有一个人,就要爱她。也许她不是最好的,但她可能是你最值得的珍惜的人。
2007-09-11 13:52
快速回复:win2003中是不是不支持session?在win2003中会出现的问题,在winxp中却 ...
数据加载中...
 
   



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

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