La funcion que buscabas para el path se llama:
basename -- Devuelve la parte del path correspondiente al nombre del archivo
Descripción
string basename ( string path [, string sufijo] )
Ejemplo 1. Ejemplo de basename()
Código PHP:
<?php
$path = "/home/httpd/html/index.php";
$file = basename($path); // $file is set to "index.php"
$file = basename($path, ".php"); // $file is set to "index"
?>