Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By JurriaanRoelofs on
I like to print copyright www.example.com in my footer, is there a variable that will call the domain name? with or without www (doesn't matter).
I tried base_url but it gives a relative base url.
Thanx in advance.
Comments
$_SERVER['HTTP_HOST']
Something like this could work:
This extracts the host from base_url. For more info, see http://www.php.net/parse_url
works perfectly! thanks.ps
works perfectly! thanks.
ps I ended up changing it like this to get www in front of it:
removed, code not very reliable
-------------------------------
http://www.sooperthemes.com/#-Drupal-Themes
site_name
You can use the $site_name variable in the theme if you set it to your site's domain name.
----
http://PointHomes.com