Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
if you have access to the apache virtualhost defiinition, there is a neater solution.
what I do is that I put an in the vhost definition, and in my prepend initialisation stuff, I do a switch on
PHP Code:
$_SERVER['DOMAIN']
to get that value back.
I use this to have a generic db connection, and to switch the connection string depending of this variable.
__________________
Only a biker knows why a dog sticks his head out the window.
|