D
DzSoundNirvana
Guest
$X = new X;
$sX = serialize($X);
$_SESSION['sX'] = $sX;
is not in your class!
see below
class X
{
var $test;
function X() {
$test = 1;
}
} <------ Ends the class this is outside of it
below is not needed in the class file
$X = new X;
$sX = serialize($X);
$_SESSION['sX'] = $sX;
and you need to do something like this
index.php
session_start();
require_once('your class file .php');
$X = new X();
$MyX = $X->$X;
echo $MyX;
$sX = serialize($X);
$_SESSION['sX'] = $sX;
is not in your class!
see below
class X
{
var $test;
function X() {
$test = 1;
}
} <------ Ends the class this is outside of it
below is not needed in the class file
$X = new X;
$sX = serialize($X);
$_SESSION['sX'] = $sX;
and you need to do something like this
index.php
session_start();
require_once('your class file .php');
$X = new X();
$MyX = $X->$X;
echo $MyX;