php get file name from url string no parameters code example
Example: php get current url without filename
echo '//'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
echo '//'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);