rajaseeth Posted November 3, 2009 Share Posted November 3, 2009 Hi, I am new to PHP. I have a requirement. I have a url as http://localhost/TestApplication/Test.php. From the above url i want only "http://localhost". is there a method to get it?. Thanks, Raja Quote Link to comment Share on other sites More sharing options...
ILMV Posted November 3, 2009 Share Posted November 3, 2009 This should do it: $_SERVER['SERVER_ADDR']; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.