Niels Posted December 1, 2011 Share Posted December 1, 2011 Hey everyone! I have a question, I need to request the current URL of the page, i currently use $_SERVER["SCRIPT_NAME"]. This works fine if it needs the url of the file it is in, but i need the url from another file (its too complicated to explain) For example i have two files called "Profile.php" and "urlreq.php", i need to echo the full url of Profile.php in urlreq.php. $_SERVER["SCRIPT_NAME"] won't work because that will get the url of urlreq.php, the file the code is currently in. I hope i explained it clearly enough Thanks in advance, Niels. Quote Link to comment https://forums.phpfreaks.com/topic/252202-_serverscript_name-from-another-file/ Share on other sites More sharing options...
trq Posted December 1, 2011 Share Posted December 1, 2011 Have you looked at the rest of the indexes available within the $_SERVER array? Quote Link to comment https://forums.phpfreaks.com/topic/252202-_serverscript_name-from-another-file/#findComment-1292989 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.