|
Posted by flamer die.spam@hotmail.com on 10/16/06 02:09
DarkPilgrim@gmail.com wrote:
> I'm a bit new to PHP and there is something I'm not sure whether PHP
> can grant.
> Given my web application has some codes that only need to be executed
> once(eg.configuration used over the whole site), but every php script
> which needs that config seems to execute that once to get configuration
> when a request comes.
> Is there any mechanism that can make a script processed only once and
> all other pages can use its output?
> (Maybe this is impossible,but I just want to get a definite answer.)
> Thx in advance!
it is normal practise to have one config file that is included in
whatever other scripts need it, thats the method i would recommend, if
the scripts were large and performance was on your mind, then you could
just write the outputs to a flat file and include that into your php
scripts, less work for php but more work for the coder.
Flamer.
[Back to original message]
|