<?php //开始使用session session_start(); //设置一个session $_SESSION['test'] = time(); //显示当前的session_id echo "session_id:".session_id(); echo "<br>"; //读取session值 echo $_SESSION['test']; //销毁一个session unset($_SESSION['test']); echo "<br>"; var_dump($_SESSION);
session