lopes_andre Posted February 25, 2009 Share Posted February 25, 2009 Hi, I have 3 pages(index.php, alarm.php and inc_data.php), The index.php and the alarm.php have the "include 'inc_data.php';" code. I need to hide some information in the "inc_data.php" if the page requested is the page "alarm.php". There is some function that gives me the name of the file? By another words, there is some function that returns the string "alarm.php"? Sorry for my english. Best Regards, André. Link to comment https://forums.phpfreaks.com/topic/146934-solved-there-is-some-php-function-that-returns-the-name-of-the-file/ Share on other sites More sharing options...
premiso Posted February 25, 2009 Share Posted February 25, 2009 Would $_SERVER['PHP_SELF'] work for you? Link to comment https://forums.phpfreaks.com/topic/146934-solved-there-is-some-php-function-that-returns-the-name-of-the-file/#findComment-771402 Share on other sites More sharing options...
lopes_andre Posted February 26, 2009 Author Share Posted February 26, 2009 Yes, it worked! Thanks Link to comment https://forums.phpfreaks.com/topic/146934-solved-there-is-some-php-function-that-returns-the-name-of-the-file/#findComment-771806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.