<?php
$path = "/home/httpd/html/index.php";
$file = basename($path); // la variabile $file contiene "index.php"
$file = basename($path,".php"); // la variabile $file contiene "index"
?>