ckoster Posted March 23, 2009 Share Posted March 23, 2009 Howdy, I have a hosted account where I have multiple domains parked. They all point to the same webroot directory. What I would like to do is figure out how to read the url into a variable and then use that to set the value of a variable. For example, if url = domain1.com then logo = domain1logo.jpg if url = domain2.com then logo = domain2logo.jpg if url = domain3.com then logo = domain3logo.jpg The part I'm having difficulty figuring out is how to capture the url as a variable. Thanks, ck Link to comment https://forums.phpfreaks.com/topic/150783-really-basic-question-about-variables/ Share on other sites More sharing options...
lonewolf217 Posted March 23, 2009 Share Posted March 23, 2009 you can use a combination of these to get the URL i believe $_SERVER["SERVER_NAME"] $_SERVER["REQUEST_URI"] Link to comment https://forums.phpfreaks.com/topic/150783-really-basic-question-about-variables/#findComment-792181 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.