hello, i\'ve got a problem with objects in a session variable.
here\'s the code, who isn\'t work...
class abc {
var $index=0;
var $hallo=2;
function getindex() {
return $index;
}
};
session_start();
session_register(\"SESSION\");
if (!isset($SESSION)) {
$SESSION = array();
}
if (!isset($SESSION[\"abc\"])) {
$SESSION[\"abc\"] = new abc;
}
/ ***************************** /
echo $SESSION[\"abc\"]->getindex();
... this function calls an errormessage like this:
Fatal error: The script tried to execute a method or access a property of an incomplete object.
Please ensure that the class definition abc of the object you are trying to operate on
was loaded before the session was started in d:\apache\htdocs\session.php on line 26<br>
when i only write simple variables into the session, i haven\'t any errors, but with objects. can you help me?
i\'ve got running php 4.0.5 on my computer.
thanx,trjo