How to get site name?
shreky - January 11, 2008 - 18:16
Hi, I am wondering how to display the sitename in my module. Any help would be greatly appreciated.
Hi, I am wondering how to display the sitename in my module. Any help would be greatly appreciated.
Use the site_name variable
Like this:
variable_get('site_name', "Default site name")
Ehmmm... and for the site url? :)
Hi,
I'm using Drupal 6.x and I'm searching for the website URL to use in an email notification.
I searched for it in the variables table of my database... I found site_name for the textual name of the website... but if I need the base URL?
Thank you for you help...
PhAI
Superglobal _SERVER
Would
$_SERVER['SERVER_NAME']work for you?Thanks
It works, but I prefer to not use server_name on a multidomain website...
However... thank for your suggestion... ;)