You are here: Re: session variable and instances of classes « PHP Programming Language « IT news, forums, messages
Re: session variable and instances of classes

Posted by Tony Marston on 07/20/05 21:21

"Scott Auge" <scott_auge@yahoo.com> wrote in message
news:scott_auge-E2722E.11443020072005@news1.west.earthlink.net...
> In article <42cad766$1_1@spool9-west.superfeed.net>,
> "Michael G" <mike-g@montana.com> wrote:
>
>> "Michael G" <mike-g@montana.com> wrote in message
>> news:42cac7ae$1_2@spool9-west.superfeed.net...
>> > What are the drawbacks, limitations, etc. of referencing/manipulating
>> > an
>> > instance of an object across calls via a session variable?
>> >
>>
>> I just noticed one thing that might be an issue. If the php enviroment
>> variable session_auto_start is set to on objects cannot be stored as
>> session
>> variables. My question is, is it standard practice to set
>> session_auto_start to 'off'?
>>
>> http://us3.php.net/manual/en/ref.session.php
>>
>
> I haven't tried it, but can't you serialize() the object, stuff it into
> a session variable, and then get it back later on?

I do this regularly, so I know it can be done. You have to remember to
include the class definition before you use the unserialize() function.

--
Tony Marston

http://www.tonymarston.net

 

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

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