我将使用会话将变量从上一页传递到当前页面,代码如下:
上一页 :
<?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;
它适用于本地主机,但不适用于网络主机。什么会导致它在网络主机的服务器上失败?