会话未显示,但如下一页所示,肯定存在


Sessions not showing but are definitely there as shown from next page

困惑
我有一个页面,应该存储一些会话,但当我尝试打印它们时,什么都不会显示
那里一定有会话,因为第一个页面有一个链接,可以将我带到第二个页面,在第二个网页中,我可以成功地显示会话!

<? 
  session_start(); 
  include "frontend/header.php";
?>
</head>
<body>
  <div id="header">
        <? include "frontend/menu.php";?>
        <div class="clear"></div>
  </div>
  <div id="green_bg" style="display:block">
<?
  echo "1";
  echo "<pre>";print_r($_SESSION); echo"</pre>";
?>
<div class="main thank-you">
<a class="thank_you">Thank You</a>
<p>Your phone number will be refilled in a moment. <br/>
  Please check your emails for confirmation.
</p>
<div class="signUp4MonthlyRefills" style="background-color: #f7931e; padding: 20px;">
  <h3>Do you want to save time and effort?</h3>
  <br/>
  Then leave the refills to us!! 
  <br/>
  <br/><i>Introducing</i>... Auto Monthly Refills!!
  <p>Sign up for automatic monthly refills and you'll never have to worry about your phone running out of credit! 
    <h1 align="center"><a href="auto-monthly-refills-form.php" style="font-size: 30px">Click Here To Sign Up.</a></h1></p>
   </div>
<br />
</div>
</div>
<? include "frontend/footer.php";?>

当代码调用会话时,页面只显示"1",然后显示一个空数组(即打印"array()")

然后,当点击链接到"auto monthly refills form.php"时,它会显示所有会话!"auto-monthly-refills-form.php"文件看起来很简单,如下所示:

<?
  session_start();
  echo "<pre>";print_r($_SESSION); die();

现在显示会话(大量数据)
如果有人知道问题出在哪里。。。

更新:
即使删除了两个页面上的session_start(),它仍然正常工作!这怎么可能呢?

好的。。。整理好了。。。请阅读。。。

尽管这是一个新页面,但代码有点脱离了其他文件的层。。。

我不认为这应该是一个问题。。。

(我原以为每个页面都需要自己的session_start(),但由于某种原因,它们不需要,而且所有这些显然都是基于一个页面的……解释起来有点复杂——可以说我正在努力整理别人的代码:-p)

不管怎样,我浏览了所有连接到这个文件的文件,删除了除主文件外的所有session_start()。现在运行良好。

现在数据显示完美!

问题:
有人对此有解释吗
为什么session_starts()过多会导致问题