programming.name Posted May 17, 2010 Share Posted May 17, 2010 Hi, as far as I know $_SERVER["SERVER_NAME"] and $_SERVER["REQUEST_URI"] returns the server address like http://example.com/. But some cases, $_SERVER["SERVER_NAME"] returns an ip address like 203.111.111.111 and $_SERVER["REQUEST_URI"] also returns the ip address with port like 203.111.111.111:25. What is going on or going wrong? Thanks. Link to comment https://forums.phpfreaks.com/topic/202088-_serverserver_name-returns-some-ip-address/ Share on other sites More sharing options...
trq Posted May 17, 2010 Share Posted May 17, 2010 Its likely that the host is setup to use ip based virtual hosts instead of name based. Its an Apache config choice. Link to comment https://forums.phpfreaks.com/topic/202088-_serverserver_name-returns-some-ip-address/#findComment-1059778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.