Mateobus Posted March 6, 2007 Share Posted March 6, 2007 Is there a way for php to get the name of the file that it is currently in? For example a function that would return "index.php" for this page which I am currently typing in? Thanks guys Link to comment https://forums.phpfreaks.com/topic/41383-get-the-name-of-its-own-file/ Share on other sites More sharing options...
tippy_102 Posted March 6, 2007 Share Posted March 6, 2007 $realname = basename($_SERVER[sCRIPT_FILENAME], ".php"); Link to comment https://forums.phpfreaks.com/topic/41383-get-the-name-of-its-own-file/#findComment-200487 Share on other sites More sharing options...
fert Posted March 6, 2007 Share Posted March 6, 2007 $_SERVER['PHP_SELF']; Link to comment https://forums.phpfreaks.com/topic/41383-get-the-name-of-its-own-file/#findComment-200492 Share on other sites More sharing options...
Mateobus Posted March 6, 2007 Author Share Posted March 6, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/41383-get-the-name-of-its-own-file/#findComment-200498 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.