kks_krishna Posted October 22, 2007 Share Posted October 22, 2007 HI, How to find the request URL in PHP? Quote Link to comment Share on other sites More sharing options...
trq Posted October 22, 2007 Share Posted October 22, 2007 Take a look at the $_SERVER array. <?php print_r($_SERVER); ?> Quote Link to comment Share on other sites More sharing options...
only one Posted October 22, 2007 Share Posted October 22, 2007 As in the current url? $_SERVER['REQUEST_URI'] For the current root $_SERVER['PHP_SELF']; check the $_SERVER[] manual on the php website. Quote Link to comment Share on other sites More sharing options...
kks_krishna Posted October 22, 2007 Author Share Posted October 22, 2007 Thanks, It helped me lot. Quote Link to comment Share on other sites More sharing options...
kks_krishna Posted October 23, 2007 Author Share Posted October 23, 2007 hi, $_SERVER['PHP_SELF']; $_SERVER['REQUEST_URI'] working only for the current file. for example i have one url which includes the footer.php. If am using the above variables, it shows the path of the footer file in the server. But i want the main url in the address bar. 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.