我将使用以下代码的会话将变量从上一页传递到当前页面:
上一页:
<?php
session_start();
$job_remarks = 'ASAS';
$_SESSION["ref"] = $job_remarks ;
echo $_SESSION["ref"] ;
..
<form id="employee" name="employee" method="post" action="nextapge.php">
<input type="submit" value="Apply Now">
当前页面:(nextpage.php)
<?php
session_start();
$refernce = isset($_POST['ref']) ? $_POST['ref'] : $_SESSION["ref"];
$refernce = $_SESSION["ref"];
echo $refernce;
它适用于locahost但不适用于Web主机。什么会导致它在Web主机的服务器上失败?