On Jan 6, 2011 4:24 PM, "Sándor Tamás" 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 look like as the in
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 ke
On Wed, Jan 5, 2011 at 3:27 PM, Nathan Nobbe 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 and add
functions
On Wed, Jan 5, 2011 at 4:27 PM, Nathan Nobbe wrote:
> On Wed, Jan 5, 2011 at 3: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
On Wed, Jan 5, 2011 at 3: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 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
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 'glo
7 matches
Mail list logo