gardan06 Posted June 25, 2008 Share Posted June 25, 2008 long story short, is there a command that outputs your site's URL? (ex. http://www.phpfreaks.net/ will be outputted) thanks in advance. Link to comment https://forums.phpfreaks.com/topic/111799-getting-your-sites-url/ Share on other sites More sharing options...
gardan06 Posted June 25, 2008 Author Share Posted June 25, 2008 never mind, i got it. to those who doesn't know yet, the command is $_SERVER['HTTP_HOST'] thanks for your time guys. Link to comment https://forums.phpfreaks.com/topic/111799-getting-your-sites-url/#findComment-573933 Share on other sites More sharing options...
bluejay002 Posted June 25, 2008 Share Posted June 25, 2008 $_SERVER['SERVER_NAME'] will also do. $_SERVER['HTTP_HOST'] is basing on the header, if there is one while $_SERVER['SERVER_NAME'] returns the server host from which the current script is running. Link to comment https://forums.phpfreaks.com/topic/111799-getting-your-sites-url/#findComment-573936 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.