note 25402 added to language.oop

From: Date: Sun, 22 Sep 2002 16:06:59 +0000
Subject: note 25402 added to language.oop
Groups: php.notes 
Request: Send a blank email to php-notes+get-37112@lists.php.net to get a copy of this message
_SESSIONS and CLASSES / OBJECTS One may instantiate an object as a session variable, however every single page that your object passes through must include the code of the class. Example: include("dbObject.php"); session_start(); if (!is_object($_SESSION['testdb'])) { $_SESSION['testdb']= new dbObject; } $_SESSION['testdb']->do_your_class_functions(); Bit o' trivia worth mentioning: I recently switched to Mozilla 1.1 from IE. When attempting to test multiple session instances from same workstation, each instance of Mozilla on the same workstation used the same session instance as the previous Mozilla. Netscape 6 does the same thing. So, to test multiple sessions simultaneously from a single workstation, use Internet Explorer. -- http://www.php.net/manual/en/language.oop.php http://master.php.net/manage/user-notes.php?action=edit+25402 http://master.php.net/manage/user-notes.php?action=delete+25402 http://master.php.net/manage/user-notes.php?action=reject+25402

« previous php.notes (#37112) next »