Shaun wrote:
Hi Gerben,

Thanks for your reply, the site will be on one server - the idea is that
there will be two domain names pointing to the server:
http://www.domain_x.com/ and http://www.domain_y.com/. Both of these domains
will have a very different interface comprised of header.php, footer.php and
a CSS file. However as both domains are pointing to the same site and set of
files they will have access to the backend files and database.

Is it possible to get the domain name from the browser and then include the
relevant file i.e.

if(get_url() ==  http://www.domain_x.com){
  include('header_x.php');
} else {
  include('header_y.php');
}

Thanks for your help

Use $_SERVER['HTTP_HOST'] variable, it will contain 'www.domain_x.com' (but can also contain 'domain_x.com', so use substr())


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to