thefortrees Posted July 6, 2007 Share Posted July 6, 2007 Hi all - I would like to retrieve the current document name and store it in a variable. Example: I am at page http://www.home.com/currentinfo.php. I would like to take the string 'currentinfo.php' and assign it to a variable. Is there any PHP function or global variable that can do that? Thanks, T Quote Link to comment Share on other sites More sharing options...
per1os Posted July 6, 2007 Share Posted July 6, 2007 <?php $page = $_SERVER['PHP_SELF']; echo 'You are currently on ' . $page; ?> Quote Link to comment Share on other sites More sharing options...
thefortrees Posted July 6, 2007 Author Share Posted July 6, 2007 Thanks Frost. 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.