Using Universal Configuration File???

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to use a universal file "" to hold the values for 3
or 4 php scripts. I have tried including it into all the pages in the
top of the script, but have thus far been unsuccessful. Do i need to
declate the values in some special way?

Re: Using Universal Configuration File???

i don't see you file but 3 things come to mind:

1. path:
check if your path is set correctly. use require() instead of include()
and your script throws a fatal error if it doesn't find the file to

2. php tags
include() puts the php parser back into html mode, so your values need
to be inside <?php ... ?> again

3. inheritance
your values inherit the variable scope of the line your include() is
on, so if you call include inside a function your values are valid only
inside this function


Site Timeline