index.shtml代码如下:
<!DOCTYPE html>
<html>
<head>
<title>xxxxxxxxxx</title>
<!--#include file="head.html"-->
</head>
<body class="home_styles">
<!--#include file="top.php"-->
          .........
<!--#include file="user.php"-->
</body>
</html>top.php代码如下:
<?php
//防止浏览器缓存,导致按F5刷新不管用
header('Content-Type: text/html; charset=utf-8');
header('Cache-Control:no-cache');
session_start();
$_SESSION['test'] = 'test01';
?>user.php代码如下:
<?php
//防止浏览器缓存,导致按F5刷新不管用
header('Content-Type: text/html; charset=utf-8');
header('Cache-Control:no-cache');
session_start();
print_r($_SESSION);
?>为什么user.php里面的session是没有值的?