PHP: basename - Manual

<?php
$path = "/home/httpd/html/index.php";
$file = basename($path);         // index.php degerini verir
?>