+ 1

How to get current PHP page name ?

hello Sololearn,How to get current PHP page name For example: I'm on page "mypage1.php", so i need to set this page name to variable pageName,smth like that : $pageName = getPageName;

28th Jul 2018, 12:24 PM
Fury
2 odpowiedzi
+ 2
You can get the file name of the current page with basename($_SERVER['PHP_SELF']);
28th Jul 2018, 1:06 PM
Quincy
+ 1
thank
28th Jul 2018, 2:24 PM
Fury