-- Sep 28 Class Thread
<?php
error_reporting(-1); ini_set('display_errors', 'On');
include('abc.php');
session_start();
if(!empty($_REQUEST['set_time']))
{
$_SESSION['time']=time();
if(isset($_REQUEST['name']))
{
$_SESSION['name']=$_REQUEST['name'];
}
}
echo session_save_path();
print_r($_SESSION);
?>
Even though it shows error for the include failure(when abc.php does not exist), it is displaying session variables.
I checked in the directory where session variables are stored. It saves the session variables in a serialized file in both cases where we give single space as well as when we give "<?php". In the non-existent file scenario, it does not store the serialized session variables in any file. But, peculiarly I was able to get the session variables displayed using $_SESSION.
Please let us know what is the expected result.
(
Edited: 2016-10-11)
<?php
error_reporting(-1); ini_set('display_errors', 'On');
include('abc.php');
session_start();
if(!empty($_REQUEST['set_time']))
{
$_SESSION['time']=time();
if(isset($_REQUEST['name']))
{
$_SESSION['name']=$_REQUEST['name'];
}
}
echo session_save_path();
print_r($_SESSION);
?>
Even though it shows error for the include failure(when abc.php does not exist), it is displaying session variables.
I checked in the directory where session variables are stored. It saves the session variables in a serialized file in both cases where we give single space as well as when we give "<?php". In the non-existent file scenario, it does not store the serialized session variables in any file. But, peculiarly I was able to get the session variables displayed using $_SESSION.
Please let us know what is the expected result.