Re: serialize

From: Date: Tue, 13 Mar 2001 14:03:08 +0000
Subject: Re: serialize
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7393@lists.php.net to get a copy of this message
do you have register_globals enabled in your php.ini? you also have to have the class definition available when unserializing it to properly reconstruct the class with all the methods. if you're using PHP4 it's quite handy to use the built-in session functionality to implement persistent classes. HTH Pavel ----- Original Message ----- From: "andrie" <andrie@ajk.its-sby.edu> To: <php-db@lists.php.net> Sent: Monday, March 12, 2001 5:20 PM Subject: [PHP-DB] serialize > Hello php-db, > > if i have a class > class myDog { > VAR $name; > Function bark(); > } > > $dog = new myDog; > > and i want to pass this class over page. someone in this forum said > to me to use serialize and pass it using cookies. > setcookie("dog", $dog); > the question is, when i used unserialize to get this class from > other page , > unserialize($dog); > > i have found out that i can find my class structure and it values there. > anybody can help me ? > > -- > Best regards, > andrie mailto:andrie@ajk.its-sby.edu > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#7393) next »