secure database info in different environments
| From: | Bruce Cowin | Date: | Tue, 03 Apr 2007 02:12:48 +0000 |
| Subject: | secure database info in different environments | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-251957@lists.php.net to get a copy of this message | ||
Hi,
I have a generic database class that I built to connect to our different databases. From other
posts that I've read, I think the safe thing is for me to put this file outside the web root,
ensure it has a .php extension, set the include path to include this folder and include it in any
pages that require it. Is this correct?
Also, how do you handle the different environments: dev, test, and prod? I don't want to have
to change the code every time I copy the file over. Do I have an independent file that determines
if that folder should point to dev/test/prod?
Thanks for your help.
Regards,
Bruce