note 88973 added to language.oop.serialization
| From: | void dot at at gmail dot com | Date: | Mon, 16 Feb 2009 16:53:05 +0000 |
| Subject: | note 88973 added to language.oop.serialization | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150726@lists.php.net to get a copy of this message | ||
You can also avoid the __PHP_Incomplete_Class_Name issue by serializing and unserializing the object
yourself, so you can have something like...
<?php
$_SESSION['obj'] = serialize($obj);
···
session_start();
···
require_once 'cls.Class.php';
$obj =& unserialize($_SESSION['obj']);
?>
Of course, you need to check that $obj is, indeed, what you expect âbut that's something
you're already doing, right?
----
Server IP: 69.147.83.197
Probable Submitter: 189.169.207.3
----
Manual Page -- http://www.php.net/manual/en/language.oop.serialization.php
Edit -- https://master.php.net/note/edit/88973
Del: integrated -- https://master.php.net/note/delete/88973/integrated
Del: useless -- https://master.php.net/note/delete/88973/useless
Del: bad code -- https://master.php.net/note/delete/88973/bad+code
Del: spam -- https://master.php.net/note/delete/88973/spam
Del: non-english -- https://master.php.net/note/delete/88973/non-english
Del: in docs -- https://master.php.net/note/delete/88973/in+docs
Del: other reasons-- https://master.php.net/note/delete/88973
Reject -- https://master.php.net/note/reject/88973
Search -- https://master.php.net/manage/user-notes.php