日期:2014-05-17 浏览次数:20552 次
session_start(); header ( "Content-type: text/html; charset=utf-8" ); if($_SESSION["goodsid"]==""){ $_SESSION["goodsid"]=$_GET["id"]."@"; }else{ $array=explode("@",$_SESSION["goodsid"]); if(in_array($_GET["id"],$array)){ $key=array_search($_GET["id"],$array); $array[$key]=""; $_SESSION["goodsid"]=implode("@",$array); }else{ $_SESSION["goodsid"].=$_GET["id"]."@"; } }