FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Preserving an object
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Preserving an object [message #174663 is a reply to message #174662] Sat, 25 June 2011 11:06 Go to previous messageGo to previous message
Jivanmukta is currently offline  Jivanmukta
Messages: 20
Registered: January 2011
Karma:
Junior Member
> Put it in a separate file and include it?

IMHO it is not enough. Object should be stored in $_SESSION.
I have similar problem.
I tried to solve it this way:
File 1:
session_start();
....
$_SESSION['statement'] = $statement; // object

File 2:
session_start();
function __autoload($className) {
require_once 'class.' . strtolower($className) . '.php';
}
$statement = $_SESSION['statement'];

but I receive such error:

object (__PHP_Incomplete_class) #1 (8) {
["__PHP_Incomplete_Class_Name"] => string(9) "Statement" etc.

Could anybody help me?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: library using $_SESSION
Next Topic: PHP Function to translate a URL into the URL that it is redirected to
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 17:03:18 GMT 2024

Total time taken to generate the page: 0.04156 seconds