You are here: [Resolved] Re: Mojavi 2.0 PHP4 Problem with object storage « PHP Programming Language « IT news, forums, messages
[Resolved] Re: Mojavi 2.0 PHP4 Problem with object storage

Posted by ezahn on 01/08/08 14:24

On 8 jan, 12:51, ezahn <evelyne.z...@gmail.com> wrote:
> Hello,
>
> I need to store in user session an instance of an OWN class, "Foo",
> for example.
> Its works inside a single action but the object doesn't "survive"
> between two actions (1)
> Trying to access this object in the second action display :
>
> Fatal error: Unknown(): The script tried to execute a method or access
> a property of an incomplete object. Please ensure that the class
> definition "Foo" of the object you are trying to operate on was loaded
> _before_ the session was started
>
> Thanks a lot for your help and ideas !
>
> (1)
> In the first action :
> require_once ('Foo.php');
> $foo = new Foo ();
> $user->setAttribute ("foo", $foo, "my-user-namespace");
>
> The following ... ok in the first action, but not in a second action
> $newfoo = $user->getAttribute ("foo","my-user-namespace");
> $newfoo->bar ();

 

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

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