Maximus Posted March 12, 2007 Share Posted March 12, 2007 I am trying to get the current page's filename, it can be gotten with "$_SERVER['PHP_SELF']". However that only tells you the filename (test.php) and not the actual variables added onto it (test.php?page=3). Can someone help me? Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted March 12, 2007 Share Posted March 12, 2007 $_SERVER['REQUEST_URI']; maybe? Quote Link to comment Share on other sites More sharing options...
Maximus Posted March 12, 2007 Author Share Posted March 12, 2007 Aha, that works! However, it also adds "&1173764234422" to the end of each url, which I belive is the unix timestamp. I guess I could remove that, but lets see if there is a better method. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted March 12, 2007 Share Posted March 12, 2007 thats odd, it doesnt add that for me. Unless that is already in your url? Quote Link to comment Share on other sites More sharing options...
Maximus Posted March 12, 2007 Author Share Posted March 12, 2007 it isen't. Maybe its the server configuration. Oh well, it'll do, thanks! Quote Link to comment Share on other sites More sharing options...
Demonic Posted March 12, 2007 Share Posted March 12, 2007 um: $link = $_SERVER['REQUEST_URI']; $link = str_replace("&1173764234422","",$link); Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted March 12, 2007 Share Posted March 12, 2007 yeh but if its the timestamp then it wont be the same. you could just do that except with time(). 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.