You are here: Re: Use of session variables « PHP Programming Language « IT news, forums, messages
Re: Use of session variables

Posted by Aaron Saray on 01/15/08 03:04

On Jan 14, 4:08 am, Jonas Werres <jo...@example.org> wrote:
> > Thanks for any info...
>
> Yes, it is serialized automatically. Which directly leads to the question:
> Can I store objects in sessions?
> Yes, you can, but you have to be sure, that the class definition is
> included/includeable by autoload ON EVERY PAGE THE SESSION IS LOADED.
> Yes, loaded. Not every page, the object is used but on every page the
> session is loaded, because in other cases, the object will break when
> unserialising.

Not to digress too much, but if storing objects in the session, it is
useful to be familiar with the magic sleep and wakeup methods. I've
made this mistake a few times - and caused a few issues with other
resources stored as references inside of the objects.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация