Re[4]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively
| From: | Richard Davey | Date: | Wed, 11 Feb 2004 15:16:08 +0000 |
| Subject: | Re[4]: [PHP] HELP: Nested include(...)'s take relative paths not int uitively | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177403@lists.php.net to get a copy of this message | ||
Hello Alex,
Wednesday, February 11, 2004, 3:08:02 PM, you wrote:
AH> Is it also recommended that an application local config file be used to set
AH> all the globals that will be used throughout? Right now I'm using the db to
AH> hold all the vars that I want to make available for all apps. Is this
AH> something that shouldn't be done this way? Is there a performance factor
When using SQL there will always be overhead that could otherwise be
avoided. Personally I use a file called common.inc which is basically
my global include file - it has nothing but variables I need set (no
functions, etc - they are held elsewhere) and files I need to include.
It sits at the root of my project and is included on every page. It's
the only file that needs to be included.
This is a matter of personal preference though - others will do it
like this, infact that is how .NET works to a degree via the
web.config file, but you may find a way which works best for you.
No-one can say if its wrong or right, but it would definitely be
quicker than a SQL query :)
--
Best regards,
Richard mailto:rich@launchcode.co.uk