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 Link to comment https://forums.phpfreaks.com/topic/58733-solved-get-current-document-name/ 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; ?> Link to comment https://forums.phpfreaks.com/topic/58733-solved-get-current-document-name/#findComment-291346 Share on other sites More sharing options...
thefortrees Posted July 6, 2007 Author Share Posted July 6, 2007 Thanks Frost. Link to comment https://forums.phpfreaks.com/topic/58733-solved-get-current-document-name/#findComment-291349 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.