PHP - Getting Current URL
php
Solution
$query = $_SERVER['PHP_SELF'];
$path = pathinfo( $query );
$what_you_want = $path['basename'];
Voila.
Problem
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 pull the `test.php` and if it's something like: `www.example.com/folder/folder1/test.php` I want again to just pull `test.php` but everything seems to pull the exact path instead of just the page. Any suggestions?