note 55826 added to language.variables.scope

From: Date: Sun, 14 Aug 2005 20:15:04 +0000
Subject: note 55826 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-93649@lists.php.net to get a copy of this message
I'm trying to duplication that which, for example, Cold Fusion calls the 'application' scope: a persistent array that is visible to all requests on a given group of .php pages. I'm writing an app that has a lot of information (such as long language lists, tag definitions, etc...) that is frequently used and consistent for all users. Either querying the database for each use of the info or querying once per page load would cause a lot of database overhead. Storing the information in $_SESSION would bog down the server's memory when many users have session open at once. Is there any way to load data from a database into memory once (or on the rare occasion that it changes in the db) and have it available across all page requests? Thanks, Dave ---- Manual Page -- http://www.php.net/manual/en/language.variables.scope.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55826 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55826&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55826&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55826&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55826&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55826&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55826&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55826&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93649) next »