PHP4, lavorando con gli oggetti e le sessioni mi trovo che se per debug stampo con print_r() un oggetto restituisce invece di NomeOggetto Object il titolo
Proprietà e metodi funzionano egregiamente.Codice PHP:__PHP_Incomplete_Class Object
Why?![]()
PHP4, lavorando con gli oggetti e le sessioni mi trovo che se per debug stampo con print_r() un oggetto restituisce invece di NomeOggetto Object il titolo
Proprietà e metodi funzionano egregiamente.Codice PHP:__PHP_Incomplete_Class Object
Why?![]()
Ciao.
Ho trovato questo :
Penso ti possa essere utile.I've just come accross something interesting relating to storing PHP5 objects in a session. If you don't provide an __autoload(), then you MUST load the class definition before calling session_start(). I guess that when you call session_start(), any objects in the session are unserialized then and there and placed into $_SESSION. If you don't provide the class definition before calling session_start(), your object will get the class __PHP_Incomplete_Class, and you won't be able to use it for anything.
![]()
Without faith, nothing is possible. With it, nothing is impossible
http://ilwebdifabio.it
Yep, ieri sera avevo trovato la soluzione ma non l'avevo ancora postata.![]()
RIassumendo, accade se viene lanciato session_start() prima della definizione della classe oggetto.![]()