PHP:使用$_SESSION设置和读取Session
参考:https://blog.csdn.net/sm20170867238/article/details/90745969
//test1.php
<?php
session_start();
$_SESSION['name']="admin";
$_SESSION['password']=123456;
echo "所在文件:".$_SERVER["PHP_SELF"]."<br/>";
echo "用户名:{$_SESSION['name']} <br/>密码:{$_SESSION['password']}";
?>
//test2.php
<?php
session_start();
echo "所在文件:".$_SERVER["PHP_SELF"]."<br/>";
echo "用户名:{$_SESSION['name']} <br/>密码:{$_SESSION['password']}";
?>