Application Configuration File

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
caseymanus
Forum Commoner
Posts: 34
Joined: Wed Nov 20, 2002 10:32 pm
Contact:

Application Configuration File

Post by caseymanus »

I want to create an application configuration file to set parameters for my application (such as database name, directories that contain files), then in my first php page read the config file. Does anyone know a good way to do this? I would like to format my config file in plain text or XML....
User avatar
caseymanus
Forum Commoner
Posts: 34
Joined: Wed Nov 20, 2002 10:32 pm
Contact:

Post by caseymanus »

I can't believe no one has ever done this...someone, anyone?
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

ok, that's annoying but...

I do this, I have a config file. It's nothing fancy just a php file that sets constants and is then included. It is nice to have all site-specific params in one place.
Post Reply