session_start();
$_SESSION[‘name’] = ‘webyang.net’;
$_SESSION[‘sex’] = ‘male’;
//session编码
$webyang = session_encode();
echo $webyang;//name|s:11:”webyang.net”;sex|s:4:”male”;
echo ‘<br/>’;
//session解码
session_decode($webyang);
echo $_SESSION[‘name’].”-“.$_SESSION[‘sex’];
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/98879.html