|
Comments for: mattias20000105
| Message # 1017039: |
|
Date: 07/23/03 20:31
By: John Pierce Subject: RE: Storing objects in sessions Actually, objects can be stored in sessions in php4. Imagine, the following (simplified of course) class yaya {class def. here } <?php $ya = new yaya; some page code here session_register("ya"); ?> As soon as the script ends the entire object contents are serialized automatically to the session. caveat: Put class yaya in an include file and include it on every page and needed or not it will be unserialized on the next page. And will again be available as $ya. If you do not include class yaya on every page the member variables and data will not be useful. Check out the php docs and look under sessions and objects. |
Previous Message | Next Message |


