GLOBAL VARIABLES
| From: | Arun | Date: | Thu, 05 Oct 2000 13:38:52 +0000 |
| Subject: | GLOBAL VARIABLES | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18725@lists.php.net to get a copy of this message | ||
Hi All,
I am a new comer to this list and a relative beginner to php too. I am working on a site in which
there is some information which all the users who come on to my site will access often. I am looking
at the best way to do this.
For example, let us take that i have to build a online test. The questions come from a bank of 100
questions with four alternatives, four reference urls associated with each question and the correct
answer. I am expecting a number of users (around 5000) people to hit my site, at about the same
time. The questions are selected at random from this lot and fed to the user.
Can some body help me on the following.
1. Can I store this information in some global space...like (Application object in asp). I saw one
thread of discussion on global variables in this list...where it was advised to include the same
file in all the pages..this essentially means recompiling the file each time for a particular
request (am i right in assuming this)...am i gaining anything by that as compared to keeping it in a
database.
2. Can i store variables which is available to all the users of the site and also reflects the
changes that any user does without writing it onto a physical file.
3. How does this approach compare in terms of reliability and performance to that of storing and
retrieving from a database.
Any information on these issues will be greatly helpful to me.
Thanks a lot
Arun