//或者用
session_destroy();
//清除所有

解决方案 »

  1.   

    session_destroy();
    或者
    unset($_SESSION);
      

  2.   

    unset($_SESSION['usrname']);这个是清楚指定的
    session_destroy();
    请除所有的
      

  3.   

    单个变量用unset
    清空用$_SESSION=array();
      

  4.   

    unset($_SESSION);
    ================
    上面这个是错误的,不能这样。。
    看手册
    Do NOT unset the whole $_SESSION with unset($_SESSION) as this will disable the registering of session variables through the $_SESSION superglobal.