Hello.
How can you organize a connection to the necessary database, depending on the site we visited? Suppose there are sites:
test1.site.ru
test2.site.ru
test3.site.ru
and a common configuration file with connection data. I realized that this can be done through $_SERVER['SERVER_NAME'] . It turns out, the database to which we connect must have a name, which is the address of the site. Are there any other options?