|
Posted by Rik on 07/30/06 05:43
Noodle wrote:
> Lorenzo Thurman wrote:
>> Is it possible to store a PHP object in a cookie?
>
> Cookies only store a simple text value. However, you can store an
> object in a PHP session.
Yup, serialize & unserialize
http://www.php.net/manual/en/language.oop.serialization.php
Class must be defined, so this autoload is quite handy:
http://www.php.net/manual/en/language.oop5.autoload.php
Note: Objects with circular references cannot be stored with serialize.
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|