Re: losing MySQL resource

From: Date: Sat, 19 Dec 2009 14:22:54 +0000
Subject: Re: losing MySQL resource
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.db 
Request: Send a blank email to php-db+get-46721@lists.php.net to get a copy of this message
OK. I finally understand. When I want to save an object across client requests, I need to serialize() that object into a session variable and when I need to use it later I need to unserialize() it into a local variable. If I modify the object, I need to replace the serialized session variable. I've tested this. Or I can let PHP do it ... and that appears to work ... as long as I load the class definitions prior to session_start() ... which appears to conflict with the manual's instruction of using session_start(). And I've tested this. Or I can use an __autoload callback? I don't see where I need to place the __autoload function itself ... and how do I tell PHP to use it ... or is it completely automatic? Thanks, Stan

« previous php.db (#46721) next »