note 26468 added to language.variables.scope
| From: | jez at india dot com | Date: | Thu, 31 Oct 2002 18:35:50 +0000 |
| Subject: | note 26468 added to language.variables.scope | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38837@lists.php.net to get a copy of this message | ||
If anyone needs a permanent array / hash, similar in functionality to ASP's application object,
check out the article on
http://zez.org/article/articleview/46/1/
which has some working code (written by me) attached. This code implements a hash with application
scope, i.e. its contents can be accessed from all php scripts running on the same computer. You
could use it, for example, to globally cache configuration settings for a site.
The hash is also cached in the db, i.e. it's inviolable. Its contents are buffered in memory,
so there's no hit on the db when accessing the hash apart from the first time you read it, and
of course when you write to it.
--
http://www.php.net/manual/en/language.variables.scope.php
http://master.php.net/manage/user-notes.php?action=edit+26468
http://master.php.net/manage/user-notes.php?action=delete+26468
http://master.php.net/manage/user-notes.php?action=reject+26468