objects in session
| From: | marc serra | Date: | Sat, 13 Mar 2004 23:28:03 +0000 |
| Subject: | objects in session | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-180363@lists.php.net to get a copy of this message | ||
Hi,
I got problem when i want to save object in session.
I got my first page when I create my object and save it to session:
<?php
Require 'test.inc.php';
Session_start();
$test = new test();
$test->Load($_Get['id']);
$_SESSION['save'] = $test;
?>
In my second page I want to retrieve my object
<?php
Require 'test.inc.php';
Session_start();
echo get_class($_SESSION['test']);
?>
When I do get_class($_SESSION['test']); I got the message
"__PHP_Incomplete_Class" instead of "test"
Can you explain me where I can have made an error.
Thx,
Marc.