DB::connect suggestion
| From: | Daniel, Adam [EESUS] | Date: | Tue, 09 Jan 2001 23:39:40 +0000 |
| Subject: | DB::connect suggestion | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-922@lists.php.net to get a copy of this message | ||
May I suggest adding logic to the connect method to read the dsn from a file
in addition to passing the complete dsn string. For example you could do
something like: $db->connect("dev.dsn") where the file "dev.dsn" contains
the full dsn as if it were passed as the parameter. The two major benefits I
see from this are: the convenience of only changing one file as apposed to
doing a find-and-replace on possibly hundreds when moving from development
to production; the second being the potential to encrypt the dsn file and
securing the username/password.
Adam Daniel
adaniel1@eesus.jnj.com