note 30036 added to language.oop.serialization
| From: | okoro22 at yahoo dot com | Date: | Tue, 04 Mar 2003 23:21:27 +0000 |
| Subject: | note 30036 added to language.oop.serialization | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44842@lists.php.net to get a copy of this message | ||
I had a problem using session_register() to globally store a class that I was working with. I hope
my solution will help beginners understand this concept of sessions in PHP
When you use session_register() to store any object, yes you don't need to call session_start()
unless you want to. However in other pages where you want to use that object, you must call
session_start() after you have included the class definition of the file. Failure to do this will
unserlize your object without its functions and it will be pretty useless.
Hope it helps someone.
Cheers.
--
http://www.php.net/manual/en/language.oop.serialization.php
http://master.php.net/manage/user-notes.php?action=edit+30036
http://master.php.net/manage/user-notes.php?action=delete+30036
http://master.php.net/manage/user-notes.php?action=reject+30036