This seems like a common questions but none of them seem to be what i\'m looking for. If there is a website:
www.example.com/test.php
I want to pu
This will get you the name of the file that was requested (based on the URL invoked, not real location of the file - just in case you are using mod_rewrite):
$filename = basename($_SERVER['REQUEST_URI']);
For both http://www.example.com/testing01.php and http://www.example.com/x/y/z/testing01.php will give you:
testing01.php