Reputation: 43677
How do I know address of opened site?
My site supports multiple domains on one folder, I have to give a different content corresponding to domain.
Like, if we are on site http://site.net/
:
$string = 1;
Or, if we are on site http://site.com/
:
$string = 2;
Thanks.
Upvotes: 2
Views: 794
Reputation: 16656
if (strstr($_SERVER['SCRIPT_URI'],'site.net'))
{
$string = 1;
}
if (strstr($_SERVER['SCRIPT_URI'],'site.com'))
{
$string = 2;
}
Upvotes: 1