Re: [PHP-DB] losing MySQL resource
[email protected] ("Stan")
| Newsgroups | php.db |
|---|---|
| Message-ID | <[email protected]> |
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