In that case you should use include_once in every script. But if you
are absolutely sure that all scripts will be processed, you can include
it only in one of them, because PHP - in short terms - does a file
include, so it will look like as the included file is part of the script.
The global
On Jan 6, 2011 4:24 PM, Sándor Tamás sandorta...@hostware.hu wrote:
In that case you should use include_once in every script. But if you are
absolutely sure that all scripts will be processed, you can include it only
in one of them, because PHP - in short terms - does a file include, so it
will
Say you have 10 or so scripts and a single config file. If you have
main.php, functions1.php, functions2.php, functions3.php..
Does is hurt to do an include of the config file in each separate
script, even if you only need a few things from it, or should you
just specify what you want with a
On Jan 5, 2011, at 4:40 PM, Paul Halliday wrote:
Say you have 10 or so scripts and a single config file. If you have
main.php, functions1.php, functions2.php, functions3.php..
Does is hurt to do an include of the config file in each separate
script, even if you only need a few things
On Wed, Jan 5, 2011 at 3:40 PM, Paul Halliday paul.halli...@gmail.comwrote:
Say you have 10 or so scripts and a single config file. If you have
main.php, functions1.php, functions2.php, functions3.php..
Does is hurt to do an include of the config file in each separate
script, even if you
On Wed, Jan 5, 2011 at 4:27 PM, Nathan Nobbe quickshif...@gmail.com wrote:
On Wed, Jan 5, 2011 at 3:40 PM, Paul Halliday paul.halli...@gmail.comwrote:
Say you have 10 or so scripts and a single config file. If you have
main.php, functions1.php, functions2.php, functions3.php..
Does is hurt
On Wed, Jan 5, 2011 at 3:27 PM, Nathan Nobbe quickshif...@gmail.com wrote:
if($cachedConfig !== null)
{
// load file and store value(s) in $cachedConfig
}
No config for you ... one year!
Sorry, couldn't resist. :p
To expand on Nathan's excellent strategy, you could go one further
7 matches
Mail list logo