The Silent Observer
Usually, I use this code to get the current page full URL that is shown in the browser URL window. PHP current url without query string.
To get the current page URL, you just need to do this:
echo currentURL();

If you just want to get page name only, you can use the script below: These code taken from: webcheatsheet.com/PHP/get_current_page_url.php