define() or $variable for application settings?
| From: | Mailing Lists) | Date: | Thu, 09 Feb 2006 03:56:08 +0000 |
| Subject: | define() or $variable for application settings? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-230140@lists.php.net to get a copy of this message | ||
Hello Everyone,
I have a config.inc.php file which basically contains all the
configuration info that the applications needs (directory/file
locations, database credentials, etc). The information there is set
using the define() function.
However, I've seen some open-source projects which either use
$variables or associative arrays to save the values.
My application works pretty fine but I'd like to solicit opinions from
everyone on what they are using in this case. Also, I have plans of
putting up a sort of coding guidelines for the company so it might
help to have other opinions on this one.
Thanks and best regards,
Matt
--
Stand before it and there is no beginning.
Follow it and there is no end.
Stay with the ancient Tao,
Move with the present.