I created a centralized script that specified a MySQL DSN & created a $dbh (database handle) for any db-aware scripts to require. I have two different sites running @ work - a production server and a development server (running on a higher port & different DocumentRoot directory).
So the script uses the caller() function and based on the filename ((caller())[1]), creates a DSN pointing to the right port of the MySQL server (I also have 2 MySQL servers running on different ports [& different data directories!
Any ideas out there? Comment away!
Thought I was smart... 0 Comments More | Login | Reply /