BBGaming Posted July 9, 2007 Share Posted July 9, 2007 How do you find the page location in PHP? I have yet to find a good tutorial site with a decent search engine... Quote Link to comment Share on other sites More sharing options...
marcus Posted July 9, 2007 Share Posted July 9, 2007 Be more specific, are you looking for the file name you're on? The page you were redirected from? The location of the file in your server (e.g. /home/name/public_html/folder/file.ext)? Quote Link to comment Share on other sites More sharing options...
BBGaming Posted July 9, 2007 Author Share Posted July 9, 2007 The location of the page you're on, ex: http://www.phpfreaks.com/forums/index.php if I was on the index page, or http://www.phpfreaks.com/forums/index.php?action=post;topic=148810.0;num_replies=1 right now. Quote Link to comment Share on other sites More sharing options...
marcus Posted July 9, 2007 Share Posted July 9, 2007 $domain = $_SERVER[HTTP_HOST]; $file = $_SERVER[REQUEST_URI]; echo $domain . $file; Quote Link to comment Share on other sites More sharing options...
BBGaming Posted July 9, 2007 Author Share Posted July 9, 2007 Thanks. 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.